Page 1 of 1

### AMIE Grade and Percentage calculator_C programme

Posted: Sun May 06, 2012 8:50 am
/*AMIE PERCENTAGE & GRADE POINT AVERAGE CALCULATOR*/

#include <stdio.h>
void main ()
{
int h, a, b, c, d, noofsubjects;
int hp, ap, bp, cp, dp;

hp=100;
ap=74;
bp=65;
cp=59;
dp=49;
int hg, ag, bg, cg, dg;
hg=10;
ag=9;
bg=8;
cg=6;
dg=5;

/*FOLLOWING CODE WILL TAKE INPUT FROM USER*/

printf("NUMBER OF SUBJECTS SCORED GRADE H : ");
scanf("%d", &h);
printf("NUMBER OF SUBJECTS SCORED GRADE A : ");
scanf("%d", &a);
printf("NUMBER OF SUBJECTS SCORED GRADE B : ");
scanf("%d", &b);
printf("NUMBER OF SUBJECTS SCORED GRADE C : ");
scanf("%d", &c);
printf("NUMBER OF SUBJECTS SCORED GRADE D : ");
scanf("%d", &d);
noofsubjects = h+a+b+c+d;
/*TOTAL GRADE IS = (h*100 + A*74 + B*65 + c*59 + d*49) */
totalgpa=((h*hg)+(a*ag)+(b*bg)+(c*cg)+(d*dg));
gpa=totalgpa/noofsubjects;

/*FOLLOWING CODE WILL TAKE INPUT FROM US OUTPUT THE DETAILS*/
printf("\n NUMBER OF SUBJECTS COUNTED: %d\n", noofsubjects);
printf("\n TOTAL MARKS IN PERCENTAGE IS : %.2f\n", percentage);
printf("\n GRADE POINT AVERAGE IS : %.2f\n", gpa);
getch();
}

Screen Shot
GPA_C.jpg

RULES FOR GPA CALCULATIONS

GPA CALCULATIONS.jpg

### Re: AMIE Grade and Percentage calculator_C programme

Posted: Sun May 06, 2012 8:53 am
I have learned C Language from the following video tutorials

http://thenewboston.org/list.php?cat=14

### Re: AMIE Grade and Percentage calculator_C programme

Posted: Sun May 06, 2012 12:02 pm