#include <stdio.h>/* 程序中的逻辑控制 循环语句: for语句 while语句 do...while语句 by 赵志远 */int main(){ int num = 0; printf("请出入打印 hello world 的次数:\n"); scanf("%d",&num); //for 循环语句 for(int i = 0;i<num; i++ ) { printf("Hello World!\n"); } printf("使用for循环语句一共打印了%d次 hello world\n",num); printf("请出入打印 hello china 的次数:\n"); scanf("%d",&num); int tmp = num; //while循环语句 while(num> 0) { printf("Hello China!\n"); num--; } printf("使用while循环语句一共打印了%d次 hello China\n",tmp); printf("请出入打印 hello bei jing 的次数:\n"); scanf("%d",&num); tmp = num; //do...while循环语句 do { printf("Hello Bei Jing!\n"); num--; } while( num> 0); printf("使用do...while循环语句一共打印了%d次 hello bei jing\n",tmp); return 0;}