C 언어 가수 채점 시스템(입문 수준)

35707 단어 대학 숙제
/*
	    :      
	  :    201623053
	  :                     ,          ,       ,         
	  :    2016.12.25
*/

#include 
#include 
#include 
#define  N 100
void     fun(void);
void     fun1(void);
void     ins(void);
int      n;

void main(void)                                                             //    &   
{
	system("color 0A");
	printf("



"
); printf("\t ----------------------------------------------
"
); printf("\t | o(* ̄▽ ̄*)o, ~|
"
); printf("\t ----------------------------------------------
"
); printf("\t | \t 1. |
"
); printf("\t | |
"
); printf("\t | \t 2. |
"
); printf("\t | |
"
); printf("\t | \t 3. |
"
); printf("\t | |
"
); printf("\t ----------------------------------------------
"
); printf("\t : :[ ]\b\b"); scanf("%d",&n); switch(n) { case 1: fun(); break; case 2: ins(); break; case 3: exit(0); } } void ins(void) // ins(); { printf("


\t :

"
); printf("\t1、 100 10
"
); printf("\t2、 10 ,
"
); printf("\t3、 , (zui) (zhong)
"
); printf("\t4、

\t です
"
); fun1(); // } void fun(void) // fun(); { int i,j; int pw,gs; char a[N][N]; char t[N]; float s[N][N]; float sum[N]={0}; float temp=0; float av[N]={0}; float max[N]={0}; float min[N]={0}; printf("


: ?
"
); // , scanf("%d",&gs); if(gs<1||gs>N) { printf(" ! ~

"
); do { printf(" : ! , ?
: "
); scanf("%d",&gs); }while(gs<1||gs>N); } printf("
: ?
"
); scanf("%d",&pw); if(pw<1||pw>10) { printf(" ! ~

"
); do { printf(" : ! , ?
"
); scanf("%d",&pw); }while(pw<1||pw>10); } printf("
**********************************************************************
"
); for(i=0;i<gs;i++) // { printf("
: ! %d :
"
,i+1); scanf("%s", a[i]); for(j=0;j<pw;j++) { printf("
: %d :
"
,j+1); scanf("%f",&s[i][j]); } } printf("
**********************************************************************
: "
); for(i=0;i<gs;i++) // , { max[i]=min[i]=s[i][0]; for(j=0;j<pw;j++) { if(s[i][j]>max[i]) max[i]=s[i][j]; if(s[i][j]<min[i]) min[i]=s[i][j]; } printf("

\t%s %.2f, %.2f"
,a[i],max[i],min[i]); } printf("

**********************************************************************
"
); for(i=0;i<gs;i++) // { { for(j=0;j<pw;j++) av[i]+=s[i][j]; } av[i]=(av[i]-max[i]-min[i])/(pw-2); } printf("


"
); // printf("

\t \t
"
); for(i=0;i<gs;i++) { printf("\t%s",a[i]); printf("\t%.2f
"
,av[i]); } printf("
**********************************************************************
"
); for(j=0;j<gs;j++) // { for(i=gs-1;i>j;i--) if(av[i]>av[i-1]) { temp=av[i]; av[i]=av[i-1]; av[i-1]=temp; } strcpy(t,a[i]); strcpy(a[i],a[i-1]); strcpy(a[i-1],t); } printf("



"
); // printf("\t \t \t
"
); for(i=0;i<gs;i++) { printf("\t%d",i+1); printf("\t%s",a[i]); printf("\t%.2f
"
,av[i]); } fun1(); // } void fun1(void) // fun1(); { printf("
\t,'''╭⌒╮⌒╮.',''',,',.'',,','',.
"
); printf("\t ╱◥██◣''o',''',,',.''.'',,',.
"
); printf("\t| | │ '',,',.',''',,',.''
"
); printf("\t╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
"
); printf("

\t1.H O M E
"
); printf("\t2.
"
); printf("\t : :[ ]\b\b"); scanf("%d",&n); switch(n) { case 1: main(); case 2: exit(0); } }

좋은 웹페이지 즐겨찾기