Question

How to compute grades using turbo c?

include<stdio.h>

main()

{

int quiz,quiz1,quiz2,

att,att1,att2,

exam,exam1,exam2,

proj,proj1,proj2,

rec,rec1,rec2,

name,name1,name2,

course,course1,course2;

clrscr();

printf("Please input your Name: \n");

scanf("%s",name);

printf("Please enter your Course: \n");

scanf("%s",course);

printf("Please input your quiz grade: \n");

scanf("%d%d",&quiz1,&quiz2);

printf("pleace input your attendance grade: \n");

scanf("%d",&att1);

printf("Please input your exam grade: \n");

scanf("%d",&exam1);

printf("please input your project grade: \n");

scanf("%d",&proj1);

printf("please input your recitation grade: \n");

scanf("%d",&rec1);

quiz=(quiz1*quiz2);

printf("Quiz=20%: %d\n",quiz);

printf("Attendace=10%: \n",att);

printf("Exam=40%: \n",exam);

printf("Project=20%: \n",proj);

printf("Recitaion=10%: \n",rec);

getch();

}

i really cant understand... please help me T_T

Answers

Look,this code seems all messed up.Because in the declaration part,the names have been declared as int and this will generate error for sure.Grade computation actually requires the Case statement.

If you can tell me what the exact question is at anuvab1911@hotmail.com then I promise to help you at as soon as possible.

#1