首页 > 其他 > 详细

实用技巧之while里面使用getchar或sleep函数

时间:2020-02-25 20:30:12      阅读:68      评论:0      收藏:0      [点我收藏+]

                                   我们经常需要打印一些变量的取值来调试程序,使用while(1)是常用的手段。

                                  

              while (1)
        {
            char letter = getchar();
            printf("test_point is %d \t\n", test_point);
            printf("test_point is %f \t\n", test_point);
            //printf("右移一些位数%d \t\n", (test_point & 0xff00) >> 16);
            //printf("hello world\n");
            //scanf("%d", &normal_point);
            printf(" letter is %c\n", letter);
        }




                 while (1)
        {
        
            printf("test_point is %d \t\n", test_point);
            printf("test_point is %f \t\n", test_point);
            Sleep(1000);
        }

 

                                    

 

实用技巧之while里面使用getchar或sleep函数

原文:https://www.cnblogs.com/nowroot/p/12363212.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!