📄 sa2301.c
字号:
#include <stdio.h>
void main()
{
int i;
int count;
int index;
//while循环例子
printf("while 循环\n");
count = 0;
while (count < 6)
{
printf("The value of count is %d\n",count);
count = count + 1;
}
getch();
//do while循环例子
printf("do while 循环\n");
i = 0;
do {
printf("The value of i is now %d\n",i);
i = i + 1;
} while (i < 5);
getch();
//for循环例子
printf("for 循环\n");
for(index = 0;index < 6;index = index + 1)
printf("The value of the index is %d\n",index);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -