标签:lib class scanf bsp == span long nbsp mic
#include <stdio.h> #include <stdlib.h> int main() { int number, max, min, n; n=1; printf("输入第%d个数: ", n); scanf("%d", &number); max = number; min = number; while(n<5) { n++; printf("输入第%d个数: ", n); scanf("%d", &number); if(number>max) max = number; else if(number<min) min = number; } printf("最大数为: %d\n", max); printf("最小数为: %d\n", min); system("pause"); return 0; }
#include <stdio.h> int main() { int count=0; int i=0; for(i=100;i<=200;i++) { int j=0; for(j=2;j<i;j++) { if(i%j==0) break; } if(j==i) { count++; printf("%d\n",i); } } printf("\n"); printf("素数的个数为:%d\n",count); return 0; }
#include <stdio.h> int main(){ long s,t,n,x; printf("enter a number:"); scanf("%d",&s); t=s,n=1; while(t/=10) n*=10; while(s){ if((x=s/n)&1) (t*=10)+=x; s%=n,n/=10; } printf("the new number is %d\n",t); return 0 ; }
标签:lib class scanf bsp == span long nbsp mic
原文地址:https://www.cnblogs.com/mario12138/p/11881300.html