The Obstacle - The Computing Test
Just had my computing test, its is soo hard that i cant do it. Or should i say, i am too lousy to do that test? Anyway, i'll just say that it is as hard as diamond. (but i would love diamond more than the test)
Here is what we are supposed to do:
Q: Develop a program to help lecturer deal with students marks
- Using array, input 10 students names and marks
- Get the mean output (MUST USE USER-DEFINED FUNCTIONS)
- Convert marks to grades
- Calculate & output the frequencies of grades (MUST USE USER-DEFINED FUNCTIONS)
--------------------------
#include
#include
int main (void)
{
int mark[10], i, n;
char grade;
double mean, frequencies;
double cal_mean (int, int, int, int, int, int, int,int, int, int);
void cal_freq (char, char, char, char);
printf("input 10 students marks= \n");
scanf("%d%d%d%d%d%d%d%d%d%d", &mark[0],&mark[1],&mark[2],&mark[3],......&mark[9]);
mean = cal_mean(mark[0],mark[1],mark[2],mark[3],......mark[9]);
for (i=0, i<=9, i++)
if (mark<=90) grade = 'A'; else if (mark....) grade = 'B'; else if(mark.....) grade = 'C'; else grade ='F'; frequencies = cal_freq( 'A', 'B', 'C', 'F'); return 0; } double cal_mean (int mark[0], int mark[1], int mark[2], int, int, int, int,int, int, int mark[9]) { mean = (mark[0]+....mark[9])/10; printf("Mean is %lf\n", mean); } void cal_freq (char 'A', char'B', char'C', char'F')
frequencies = n;
printf("frquencies is %d\n", frequencies);
}
--------------------------------
ok i know its rubbish work. i cant run it, i have 21 errors and 1 warning! isnt it great?
1st thing, i cant really use For Loop, i duno how to use it.
2nd:i cant do user-defined functions (thats practically the whole thing, cos must use that to calculate mean & freq)
3rd: i duno how to do frequencies cos thats the number of times each grade appeared. Chim.
--------------------------------
For example if i dream i fail phy test, it is due to my daily worrying over the phy test. As i was too scared that i would fail it, i tried to stop thinking. But the FACT was that i had thought of failing it, so the 'failing of test' thought 'came out' at night when i was semi-conscious.
I like to dream, in case you dont know. Though they are not logical, they are interesting! I am indeed a girl who dare to dream. (dream of the impossible!!)
Kitty...Meow...Chirp!
This pic was taken at my house void deck. this cat initially was not sitting down. but after knowing that i had been trying to take its pic, it actually sat down!
after taking the pic, i left. i turned my head back and saw it get up and walked away too...
it yearns for attention. Which animal doesnt?
No more post b4 exams, i shall be firm..