#include<stdio.h>标签:int,打印,++,倍数,printf,100,101 From: https://blog.51cto.com/u_13606048/6086987
int main() {
int n = 0;
for (int i = 1; i < 101; i++) {
if (i % 3 == 0) {
printf("%d是3的倍数\n", i);
n++;
}
}
printf("在1-100内共有%d个是3的倍数",n);
return 0;
}
#include<stdio.h>标签:int,打印,++,倍数,printf,100,101 From: https://blog.51cto.com/u_13606048/6086987
int main() {
int n = 0;
for (int i = 1; i < 101; i++) {
if (i % 3 == 0) {
printf("%d是3的倍数\n", i);
n++;
}
}
printf("在1-100内共有%d个是3的倍数",n);
return 0;
}