Home > Back-end >  C. language
C. language

Time:11-02

Who is a great god can help us have a look at why the output error?
# include
# include
# include

Struct student
{
Char banji [10].
Char xuehao [9].
Char xingmin [8].
Double qimocj;
Double pingshicj;
Double zongcj;


};
Struct student ren [100].
int i=0;
Void luru ();
Void chaxun ();
Void xiugai ();
Void fanhui ();
Void xianshi ();
Void chakan ();
Void main ()
{the while (1)
{
Printf (" -- -- -- -- -- -- -- -- welcome to use, this program is used to calculate student achievement assessment -- -- -- -- -- - \ n ");
Puts (" \ t - 1 entry scores ");
Puts (" \ t 2 - query information ");
Puts (" \ t 3 - modify information ");
Puts (" \ t 4 - check your information ");
Puts (" \ t 5 -- - return to the main menu ");
Printf (" please input digital perform operations: ");
Char x;
The scanf (" % c ", & amp; X);
The switch (x)
{case '1', luru ();
break;
Case '2' : chaxun ();
break;
Case: '3' xiugai ();
break;
Case '4' : chakan ();
break;
Case '5' :
/* the scanf (" % c ", & amp; X); */
return;
}
The scanf (" % c ", & amp; X);
The scanf (" % c ", & amp; X);
}
}
Void luru ()
{the while (1)
{
Printf (" class: ");
The scanf (" % s ", & amp; Ren [I] banji);
Printf (" student number: ");
The scanf (" % s ", & amp; Ren [I] xuehao);
Printf (" name: ");
The scanf (" % s ", & amp; Ren [I] xingmin);
Printf (" final grade: ");
The scanf (" % ld ", & amp; Ren [I] qimocj);
Printf (" grades: ");
The scanf (" % ld ", & amp; Ren [I] pingshicj);
Ren [I] zongcj=ren [I] pingshicj * (3/10.0) + ren [I] qimocj * (7/10.0);
Printf (" grade: % ld \ n ", ren [I] zongcj);
i++;
Printf (" whether to continue to input student achievement? (y/n) : ");//y represent yes, n for no
Char x=getchar ();//short read enter
char c;
The scanf (" % c ", & amp; C);
If (c=='n')
Puts (" \ n ");
The main ();

}

Void chakan ()
{printf (" the class student id \ \ \ t t t t \ \ t name \ \ t t your final course grade \ t grades \ t \ n \ t grade ");
For (int m=0; M{
Printf (" % s \ \ t t t t % s \ % s \ \ t ld \ t \ \ t % t % ld t \ \ t % ld \ n ", ren [m]. Banji, ren [m]. Xuehao, ren [m]. Xingmin, ren [m]. Qimocj, ren [m]. Pingshicj, ren [m]. Zongcj);

}


}

CodePudding user response:

Why do you want to call main ();
  • Related