中蓝a区419吧 关注:13贴子:635
  • 5回复贴,共1

【C语言自制投票程序】关于堂主最喜欢的太太投票~`

取消只看楼主收藏回复

1L防抽..
欢迎大家把这个程序复制进Turbo C环境来投票试试~`
提示:如果感觉进入死循环,请在用户界面中输入"-1",即可退出..~
下面发程序~`投票数字是1,2,3,4,5,6,分别对照宿舍人物床号,大家可以投票``


IP属地:北京1楼2009-04-03 11:36回复
    #include<stdio.h>
    void main()
    {
     int vote,tuanzhang_vote,invalidvote;
     tuanzhang_vote=0,invalidvote=0;
     printf("Who is the most excellent one in Tangzhu's eyes?\n");
     scanf("%d",&vote);
     while(vote!=-1)
     {
     switch(vote)
     {
     case 1:
     case 2:
     case 3:
     case 4:
     case 5:
     case 6:tuanzhang_vote++;break;
     case 0:invalidvote++;break;
     }
     printf("Please enter the next number:\n");
     scanf("%d",&vote);
     }
     printf("The vote of tuanzhang is %d.\n",tuanzhang_vote);
     printf("Let's tell tuanzhang the excellent news!\n");
    }


    IP属地:北京2楼2009-04-03 11:36
    回复
      哈哈~团长真可爱哈~`决定把对你的鄙视减少0.1%~`


      IP属地:北京5楼2009-04-03 11:51
      回复
        谢谢谢谢~`大家的支持是我最大的动力!!我会继续努力做出这类程序滴~`


        IP属地:北京7楼2009-04-03 11:55
        回复
          请不要偷换概念..= =..
          是减少0.1%,也就是减少到99.9%..= =..
          我理解你的心情..团长~`


          IP属地:北京9楼2009-04-03 11:59
          回复
            LS很邪恶..= =..~`


            IP属地:北京14楼2009-04-25 12:06
            回复