C语言编写选票统计程序

2025-05-06 10:07:18

1、首先打开VC++

C语言编写选票统计程序

3、创建一个空白C++文档

C语言编写选票统计程序

5、主函数当然也要写上void main(){}

C语言编写选票统计程序

7、用while循环输入选票while(1){clrscr();/*输入候选者的人数*/printf("Input the num of the electees in the election:暧苗争死");scanf("%d",&ElecteeNum);if( ElecteeNum>1&&ElecteeNum<MAX )break;}/*输入每个年级的每个候选者的票数*/printf("Please input a ElecteeID and the votes of three nations:\n");printf(" ElecteeID GradeA GradeB GradeC\n");/*计算每个候选者的平均票数*/

C语言编写选票统计程序
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢