#include<stdio.h>int main(){int num,count=0,i=0,ret=0;scanf("%d",&num);count=num;while(num>1){ num/=2; ret++;}printf("log2 of %d = %d\n",count,ret); r Read More
#include<stdio.h>int main(){int num,count=0,i=0;scanf("%d",&num);printf("num++=%d\n",num++);printf("num=%d\n",num);printf("++num=%d\n",++num);printf(" Read More
#include<stdio.h>int main(){int num,count=0,i=0;scanf("%d",&num);num/=10;count++;while(num>0){ num/=10; count++;}printf("%d\n",count);return 0;}//注意:在 Read More
#include<stdio.h>int main(){int score,grade;scanf("%d",&score);grade=score/10;switch (grade){case 10:case 9: printf("A\n"); break;case 8: printf("B\n" Read More
#include<stdio.h>int main(){int num;int a,b,c,result,d,result1;scanf("int%d",&num);//scanf 的东西必须是要输入的: 内容!!!a=num/100;b=num%10;c=num%100/10;d=num/10%1 Read More
#include<stdio.h>int main(){int num;int a,b,c,result,d,result1;scanf("%d",&num);a=num/100;b=num%10;c=num%100/10;d=num/10%10;printf("%d %d %d\n",a,b,c) Read More
#include<stdio.h>/*void change(int m,int n){ int t; t=m; m=n; n=t;}*/int main(){//交换两杯水,需要一个空杯子,临时保存作用int a=5;int b=6;int t;//scanf("%d%d",&a,&b);t=a; Read More
#include<stdio.h> int main(){printf("请分别输入身高的英尺和英寸," "如输入\"5 7\"表示5英尺7英寸:\n");int foot;double inch;scanf("%d %lf",&foot,&inch);printf("身高是%f米。\n",((fo Read More