黑马程序员技术交流社区

标题: for [打印本页]

作者: 马志华    时间: 2014-12-12 00:03
标题: for
#include <stdio.h>

int main()
{
    /*int number = 0;
    for (; number <50; ) {
        printf("做第%d次俯卧撑\n",number);
        number++;
    }*/
   
   
   
    /*for (int number = 0; number <50; number++)
    {
        printf("做第%d次俯卧撑\n", number);
    }*/
   
   
    /*int count = 0;
    for (;count<50;)
    {
        printf("做第%d次俯卧撑\n",count);
        count++;
   
    }*/
   
   
   
   /* for ( int count = 0;count<50;)
    {
        printf("做第%d次俯卧撑\n",count);
        count++;
        
    }
*/
   
   /* for ( int count = 0;count<50;count++)
    {
        
        printf("做第%d次俯卧撑\n",count);
        
    }
*/
    int count = 0;
    while (count <50)
    {
        printf ("做第%d次俯卧撑\n",count);
        count++;
   
    }


    return 0;
}




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2