C语言题目9
//打印100以内的素数 #include"stdio.h" int main() { int i; int j; int flag = 1; for(i=2; i<100; i++) { flag = 1; for(j=i-1; j>1; j--) { if(i%j == 0) { flag = 0; break; } } if(flag == 1) { printf("%d ", i); } } printf("\n"); return 1; }
//打印100以内的素数 #include"stdio.h" int main() { int i; int j; int flag = 1; for(i=2; i<100; i++) { flag = 1; for(j=i-1; j>1; j--) { if(i%j == 0) { flag = 0; break; } } if(flag == 1) { printf("%d ", i); } } printf("\n"); return 1; }
2022年9月21日 13:57
All Karnataka Secondary Education Board Government and private school students can download those subject wise new syllabus Kar 6th, 7th, 8th, 9th Question Paper 2023 Kar 7th Class Question Paper with bit questions for guessing important questions of SA-1, SA-2, SA-3, SA-4 and FA-1, FA-2, FA-3, FA-4 examination tests with annual final public examination tests 2023, every year the KSEEB is announced high school level STD-6, STD-7, STD-8, STD-9 study material with IMP question bank to both medium students of KSEEB.