爱问知识人 爱问教育 医院库

C语言问题

首页

C语言问题

烦请方便请帮我用C语言编一个程序
旅游统计管理:1,2,3--3个景点
1,按点击人数排序。
2,按各景点门票收入排序。(门票价格自定。)
3,如果某景点人数达到上限,需给出提示。(上限人数自定)

提交回答
好评回答

其他答案

    2019-03-12 16:20:52
  •   #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;}。
      

    赵***

    2019-03-12 16:20:52

  • 2019-03-12 15:34:27
  • 谁说不需要?!
    PRINTF和SCANF函数不都得要?

    海***

    2019-03-12 15:34:27

相关推荐

正在加载...

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 169-188
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):