Advertisement

C Programming


C programming
To find  GPA?

#include<stdio.h>
#include<conio.h>
void main()
{
int x;
float a;
printf("Putting your marks::");
scanf("%d",&x);
a=x;
{
if(x>=80)
a=4.00;
else if(x>=75)
a=3.75;
else if(x>=70)
a=3.5;
else if(x>=65)
a=3.25;
else if(x>=60)
a=3.00;
else
a=0;
}
printf("Your GPA::%f",a);
getch();
}

No comments:

Post a Comment

Please comment bellow. Share your knowledge