Page 1 of 1

AMIE Grade and Percentage calculator_C programme

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

#include <stdio.h>
void main ()
{
int h, a, b, c, d, noofsubjects;
float totalgrade, totalgpa, percentage, gpa;
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) */
totalgrade=((h*hp)+(a*ap)+(b*bp)+(c*cp)+(d*dp));
totalgpa=((h*hg)+(a*ag)+(b*bg)+(c*cg)+(d*dg));
percentage=totalgrade/noofsubjects;
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

PostPosted: Sun May 06, 2012 8:53 am
by RAVIGARU
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

PostPosted: Sun May 06, 2012 12:02 pm
by abhijit
Hey all members please go through the link to your address bar which RAVIGARU had given. it is really helpful to all of you.

thank you RAVIGARU for such a valuable link.


:) :) :) :)

Re: AMIE Grade and Percentage calculator_C programme

PostPosted: Sun May 06, 2012 2:25 pm
by RAVIGARU
http://thenewboston.org
its a wonderful site for video tutorials of different subject related to computers
You Can get C, C++, Java (useful for Section B CSE) and some others
Really very nice Tutorials