#include<stdio.h>
int main()
{
int i = 1;
while(i<=10)
{
printf("%d ", i);
i = i+1;
}
return 0;
}
用 while 打印1-10
该代码展示了C语言中使用while循环和printf函数实现从1到10的数字打印的基本程序。
摘要由CSDN通过智能技术生成