啊哈磊_编程从这里起步
标题:
1~100不用for怎么写
[打印本页]
作者:
光阴似箭
时间:
2019-7-9 11:25
标题:
1~100不用for怎么写
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a b
a=1;
b=2;
while(b<200)
{
b=b+2;
a=a+1+a;
printf("%d",a);
}
return 0;
}
复制代码
作者:
Austin
时间:
2019-7-12 22:33
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a=1;
while(a<=100)
{
printf(“%d”,a);
a++;
}
return 0;
}
欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/)
Powered by Discuz! X3.2