日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

国王放米粒的C语言程序,云南大学软件学院C语言实验米粒问题.doc

發布時間:2025/3/15 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 国王放米粒的C语言程序,云南大学软件学院C语言实验米粒问题.doc 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

云南大學--軟件學院--C語言實驗--米粒問題

PAGE

PAGE 1

———————————————————————————————— 作者:

———————————————————————————————— 日期:

/*米粒問題*/

#include

int main()

{

int a=1,i,sum=0;

printf("Input a number :%d",i);

scanf("%d",&i);

if(i<=64)

{

sum=sum+a;

a=a*2;

}

printf("The total mnube is:%d\n",sum);

return 0;

}

/*乘法口訣表*/

#include long a=10000,b,c=2800,d,e,f[2801],g;int main(){ for(;b-c;)

f[b++]=a/5;for(;d=0,g=c*2;c-=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,f[b]=d%--g,d/=g--,--b;d*=b); return 0;}

/*利潤問題*/

#include

int main()

{

int elery,extra;

float a;

printf("please input the elery:");

scanf("%d",&elery);

a=(elery-1)/100000;

switch(a)

{

case 0:

extra=elery*10/100;

printf("The extra is %f",extra);

}

return 0;

}

/*獎學金問題*/

#include?int?main(){int?a;float?profit,income;printf("Please?input?the?profit:");scanf("%f",&profit);a=(profit-1)/100000;switch(a){case?0:income=profit/10;break;case?1:income=(profit-100000)*0.075+10000;break;case?2:case?3:income=(profit-200000)*0.05+10000+7500;break;case?4:case?5:income=(profit-400000)*0.03+10000+7500+10000;break;case?6:case?7:case?8:case?9:income=(profit-600000)*0.01+10000+7500+10000+6000;break;case?10:income=(profit-1000000)*0.01+10000+7500+10000+6000+6000;}????printf("獎金數值為:%f\n",income);????return?0;}

/*星星問題*/(暫時還有問題)

#include

int main()

{

int x,y,z;

printf("Input a number:”);

scanf("%d",&z);

for(x=1;x<=z;x++)

{

for(y=1;y<=z;y++)

{

if((z-1)/2+x-y>=0&&x-y-(z-1)/2<=0&&x+y-(z-1)/2>=0&&x+y-(3*z-1)/2<=0)

printf("*");

else

printf(" ");

}

printf("\n");

}

return 0;

}if((z-1)/2+x-y>=0&&x-y-(z-1)/2<=0&&x+y-(z+3)/2>=0&&x+y-(3*z+1)/2<=0)

修改為下面

換算問題

#include

int main()

{

int a,b,c,day;

printf("Please input three numbers:");

scanf("%d%d%d",&a,&b,&c);

b<=12;

c<=31;

day=365*a+30*b+c;

printf("天數為:%d",

總結

以上是生活随笔為你收集整理的国王放米粒的C语言程序,云南大学软件学院C语言实验米粒问题.doc的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。