求:合唱评分系统的源程序源代码 30
要急死了,懂的朋友帮个忙啊!!!我的积分很少,我全部贡献了。!!!不好意思啊,是C++的,谢谢!!!!这个系统主要是这样的:能介绍上场班级领唱名字然后给各个班打分综合分然...
要急死了,懂的朋友帮个忙啊!!!
我的积分很少,我全部贡献了。!!!
不好意思啊,是C++的,谢谢!!!!
这个系统主要是这样的:
能介绍上场班级 领唱名字 然后给 各个班打分 综合分 然后排名
主要能用到 类 就可以了
谢谢啊!!! 展开
我的积分很少,我全部贡献了。!!!
不好意思啊,是C++的,谢谢!!!!
这个系统主要是这样的:
能介绍上场班级 领唱名字 然后给 各个班打分 综合分 然后排名
主要能用到 类 就可以了
谢谢啊!!! 展开
展开全部
哪种语言的都没说啊
--------------------------------
C++不会,
我看没有人回答
在网上找了个源码你看看吧
#include <iostream>
#include <fstream>
using namespace std;
void Sort( float array[], int n )
{
int i, j;
float t;
for( i = 1; i < n; i++ )
{
for( j = 0; j < n - i ; j++ )
{
if( array[j] < array[j + 1] )
{
t = array[j];
array[j] = array[j+1];
array[j+1] = t;
}
}
}
return;
}
int main()
{
int p=0;
float claspot[100];
float temppot[100];
ofstream out;
out.open("score.txt");
float score[100];
cout<<"Mars评分统计系统"<<endl<<"程序员--Martian"<<endl<<"E-mail:supermartian@gmail.com"<<endl<<"---------------------------------------------"<<endl;
cout<<"初始数据录入"<<endl;
cout<<"输入评委人员数: ";
int teachers;
cin>>teachers;
cout<<endl;
int grade;
cout<<"输入当前年级: ";
cin>>grade;
cout<<endl;
int clas;
cout<<"输入班级数: ";
cin>>clas;
cout<<endl<<endl;
int t1,t2,t3,t4,t5;
cout<<"输入奖项信息: "<<endl;
cout<<"特等奖数: "; cin>>t1; cout<<endl;
cout<<"一等奖数: "; cin>>t2; cout<<endl;
cout<<"二等奖数: "; cin>>t3; cout<<endl;
cout<<"三等奖数: "; cin>>t4; cout<<endl;
cout<<"组织奖数: "; cin>>t5; cout<<endl;
char right;
out<<"水果湖高级中学12.9合唱评分统计"<<endl<<"程序员--Martian"<<endl<<"E-mail:supermartian@gmail.com"<<endl<<"---------------------------------------------"<<endl;
out<<"班级"<<" ";
for(int i=1;i<=teachers;i++)
{
out<<i<<"号评委评分"<<" ";
}
out<<"最后分数"<<endl;
cout<<"初始数据录入完成,开始分数录入"<<endl<<"---------------------------------------------"<<endl;
for(int i=1;i<=clas;i++)
{
p++;
int clsnum;
cout<<"输入当前班级: ";
cin>>clsnum;
cout<<endl;
out<<"高"<<grade<<"("<<clsnum<<")班 ";
cout<<"班级录入完毕"<<endl;
loop:
for(int k=1;k<=teachers;k++)
{
cout<<k<<"号评委评分"<<endl;
cin>>score[k];
}
cout<<"评委打分录入完毕"<<endl;
float temp=0;
int k;
for(k=1;k<=teachers;k++)
{
temp+=score[k];
}
temp=temp/teachers;
cout<<"当前班级最终分数为 "<<temp<<endl;
cout<<"请确认数据无误。需要重新输入吗?(y/n)";
char ok;
cin>>ok;
cout<<endl;
if(ok=='y')
{
cout<<"以下将重新录入该班级分数"<<endl<<"---------------------------------------------"<<endl;
goto loop;
}
for(int k=1;k<=teachers;k++)
{
out<<score[k]<<" ";
}
temppot[p]=temp;
claspot[clsnum]=temp;
out<<temp;
out<<endl;
cout<<"当前班级分数录入完毕"<<endl<<"开始准备录入下一班级"<<endl<<"---------------------------------------------"<<endl;
}
cout<<"全部数据录入完毕"<<endl<<"---------------------------------------------"<<endl;
out<<"---------------------------------------------"<<endl;
cout<<"最终排名"<<endl<<"---------"<<endl;
out<<"最终排名"<<endl<<"---------"<<endl<<endl<<endl;
Sort(temppot,p+1);
for(int i=0;i<=p+1;i++)
{
for(int j=1;j<=100;j++)
{
if(temppot[i]==claspot[j])
{
if(i==0){
cout<<endl<<endl<<"+++++++++"<<endl<<"特等奖"<<endl<<"+++++++++"<<endl<<endl;
out<<endl<<endl<<"+++++++++"<<endl<<"特等奖"<<endl<<"+++++++++"<<endl<<endl;
}
if(i==t1){
cout<<endl<<endl<<"+++++++++"<<endl<<"一等奖"<<endl<<"+++++++++"<<endl<<endl;
out<<endl<<endl<<"+++++++++"<<endl<<"一等奖"<<endl<<"+++++++++"<<endl<<endl;
}
if(i==t1+t2){
cout<<endl<<endl<<"+++++++++"<<endl<<"二等奖"<<endl<<"+++++++++"<<endl<<endl;
out<<endl<<endl<<"+++++++++"<<endl<<"二等奖"<<endl<<"+++++++++"<<endl<<endl;
}
if(i==t1+t2+t3){
cout<<endl<<endl<<"+++++++++"<<endl<<"三等奖"<<endl<<"+++++++++"<<endl<<endl;
out<<endl<<endl<<"+++++++++"<<endl<<"三等奖"<<endl<<"+++++++++"<<endl<<endl;
}
if(i==t1+t2+t3+t4){
cout<<endl<<endl<<"+++++++++"<<endl<<"组织奖"<<endl<<"+++++++++"<<endl<<endl;
out<<endl<<endl<<"+++++++++"<<endl<<"组织奖"<<endl<<"+++++++++"<<endl<<endl;
}
cout<<"高"<<grade<<"("<<j<<")班得分: "<<temppot[i]<<" "<<endl;
out<<"高"<<grade<<"("<<j<<")班得分: "<<temppot[i]<<" "<<endl;
claspot[j]=0;
break;
}
}
}
cout<<endl<<"---------------------------------------------"<<endl;
out.close();
cout<<"谢谢使用!"<<endl<<"^_^"<<endl<<"---------------------------------------------"<<endl;
system("PAUSE");
return 0;
}
--------------------------------
C++不会,
我看没有人回答
在网上找了个源码你看看吧
#include <iostream>
#include <fstream>
using namespace std;
void Sort( float array[], int n )
{
int i, j;
float t;
for( i = 1; i < n; i++ )
{
for( j = 0; j < n - i ; j++ )
{
if( array[j] < array[j + 1] )
{
t = array[j];
array[j] = array[j+1];
array[j+1] = t;
}
}
}
return;
}
int main()
{
int p=0;
float claspot[100];
float temppot[100];
ofstream out;
out.open("score.txt");
float score[100];
cout<<"Mars评分统计系统"<<endl<<"程序员--Martian"<<endl<<"E-mail:supermartian@gmail.com"<<endl<<"---------------------------------------------"<<endl;
cout<<"初始数据录入"<<endl;
cout<<"输入评委人员数: ";
int teachers;
cin>>teachers;
cout<<endl;
int grade;
cout<<"输入当前年级: ";
cin>>grade;
cout<<endl;
int clas;
cout<<"输入班级数: ";
cin>>clas;
cout<<endl<<endl;
int t1,t2,t3,t4,t5;
cout<<"输入奖项信息: "<<endl;
cout<<"特等奖数: "; cin>>t1; cout<<endl;
cout<<"一等奖数: "; cin>>t2; cout<<endl;
cout<<"二等奖数: "; cin>>t3; cout<<endl;
cout<<"三等奖数: "; cin>>t4; cout<<endl;
cout<<"组织奖数: "; cin>>t5; cout<<endl;
char right;
out<<"水果湖高级中学12.9合唱评分统计"<<endl<<"程序员--Martian"<<endl<<"E-mail:supermartian@gmail.com"<<endl<<"---------------------------------------------"<<endl;
out<<"班级"<<" ";
for(int i=1;i<=teachers;i++)
{
out<<i<<"号评委评分"<<" ";
}
out<<"最后分数"<<endl;
cout<<"初始数据录入完成,开始分数录入"<<endl<<"---------------------------------------------"<<endl;
for(int i=1;i<=clas;i++)
{
p++;
int clsnum;
cout<<"输入当前班级: ";
cin>>clsnum;
cout<<endl;
out<<"高"<<grade<<"("<<clsnum<<")班 ";
cout<<"班级录入完毕"<<endl;
loop:
for(int k=1;k<=teachers;k++)
{
cout<<k<<"号评委评分"<<endl;
cin>>score[k];
}
cout<<"评委打分录入完毕"<<endl;
float temp=0;
int k;
for(k=1;k<=teachers;k++)
{
temp+=score[k];
}
temp=temp/teachers;
cout<<"当前班级最终分数为 "<<temp<<endl;
cout<<"请确认数据无误。需要重新输入吗?(y/n)";
char ok;
cin>>ok;
cout<<endl;
if(ok=='y')
{
cout<<"以下将重新录入该班级分数"<<endl<<"---------------------------------------------"<<endl;
goto loop;
}
for(int k=1;k<=teachers;k++)
{
out<<score[k]<<" ";
}
temppot[p]=temp;
claspot[clsnum]=temp;
out<<temp;
out<<endl;
cout<<"当前班级分数录入完毕"<<endl<<"开始准备录入下一班级"<<endl<<"---------------------------------------------"<<endl;
}
cout<<"全部数据录入完毕"<<endl<<"---------------------------------------------"<<endl;
out<<"---------------------------------------------"<<endl;
cout<<"最终排名"<<endl<<"---------"<<endl;
out<<"最终排名"<<endl<<"---------"<<endl<<endl<<endl;
Sort(temppot,p+1);
for(int i=0;i<=p+1;i++)
{
for(int j=1;j<=100;j++)
{
if(temppot[i]==claspot[j])
{
if(i==0){
cout<<endl<<endl<<"+++++++++"<<endl<<"特等奖"<<endl<<"+++++++++"<<endl<<endl;
out<<endl<<endl<<"+++++++++"<<endl<<"特等奖"<<endl<<"+++++++++"<<endl<<endl;
}
if(i==t1){
cout<<endl<<endl<<"+++++++++"<<endl<<"一等奖"<<endl<<"+++++++++"<<endl<<endl;
out<<endl<<endl<<"+++++++++"<<endl<<"一等奖"<<endl<<"+++++++++"<<endl<<endl;
}
if(i==t1+t2){
cout<<endl<<endl<<"+++++++++"<<endl<<"二等奖"<<endl<<"+++++++++"<<endl<<endl;
out<<endl<<endl<<"+++++++++"<<endl<<"二等奖"<<endl<<"+++++++++"<<endl<<endl;
}
if(i==t1+t2+t3){
cout<<endl<<endl<<"+++++++++"<<endl<<"三等奖"<<endl<<"+++++++++"<<endl<<endl;
out<<endl<<endl<<"+++++++++"<<endl<<"三等奖"<<endl<<"+++++++++"<<endl<<endl;
}
if(i==t1+t2+t3+t4){
cout<<endl<<endl<<"+++++++++"<<endl<<"组织奖"<<endl<<"+++++++++"<<endl<<endl;
out<<endl<<endl<<"+++++++++"<<endl<<"组织奖"<<endl<<"+++++++++"<<endl<<endl;
}
cout<<"高"<<grade<<"("<<j<<")班得分: "<<temppot[i]<<" "<<endl;
out<<"高"<<grade<<"("<<j<<")班得分: "<<temppot[i]<<" "<<endl;
claspot[j]=0;
break;
}
}
}
cout<<endl<<"---------------------------------------------"<<endl;
out.close();
cout<<"谢谢使用!"<<endl<<"^_^"<<endl<<"---------------------------------------------"<<endl;
system("PAUSE");
return 0;
}
AiPPT
2024-09-19 广告
2024-09-19 广告
作为北京饼干科技有限公司的工作人员,关于AIPPT免费生成PPT的功能,我可以简要介绍如下:AIPPT是一款基于人工智能技术的PPT制作工具,它为用户提供了免费生成PPT的便捷服务。用户只需简单输入PPT的主题或内容大纲,AIPPT便能智能...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询