C语言问题
烦请方便请帮我用C语言编一个程序 旅游统计管理:1,2,3--3个景点 1,按点击人数排序。 2,按各景点门票收入排序。(门票价格自定。) 3,如果某景点人数达到上限,需给出提示。(上限人数自定)
实在没有人为我回答,自己收回
#includefloatprice1,price2,price3;intcount_max;floatsort(floatincome1,floatincome2,floatincome3)main(){intcount1=0,count2=0,count3=0;intntotal;printf("youshoulddecidethemaxofthepeople'snumber,andthepriceofeveryplace。
\n");printf("so,first,plaseinputthemaxofpeople'snumber");scanf("%d",&count_max);printf("then,pleaseinputthepriceofeveryplace");scanf("%f,%f,%f",&price1,&price2,&price3);printf("1:summerpalace;\n");printf("2:winterpalace;\n");printf("3:horseracetrack;\n");printf("choosetheplaceyouwanttogoto:\n");printf("EnterEOFcharactertoendinput。
\n");while((ntotal=getchar())!=EOF){switch(ntotal){case1:++count1;break;case2:++count2;break;case3:++count3;break;case'\n':;case'':break; ("Incorrectnumberentered。
");printf("Enteranewnumber:\n");break;}printf("\nTotalsofpeoplenumbersforeachsightspots:\n");printf("summerpalace:%d\n",count1);printf("winterpalace:%d\n",count2);printf("horseracetrack:%d\n",count3);}return0;}。
谁说不需要?! PRINTF和SCANF函数不都得要?
问:C语言C语言C语言C语言C语言 josephus问题,急!!!
答:josephus问题是什么? 你把问题贴出来,才好解决.详情>>
问:计算机三级计算机三级请问全国计算机等级考试中的三级网络技术和数据库哪个好学一些?...
答:如果你理解能力强考数据库,其中比如关系数据库之类的需要去领悟 如果你记忆能力强考网络,各种各样的名词,背下来就得分。 还有官方指定的教材要有,上机最好做一做南开...详情>>
答:读指针用来记录文件当前文件之前的读取位置,它指向下一个将要读取的信息项详情>>