# Write a C C++ program to find grade from given percent

## Write a C C++ program to find grade from given percent

Looping और iterative statements के बारे में और अधिक जानने के लिए देखें— Looping statements in C

If statement और decision making statements के बारे में अधिक जानने के लिए देखें— If statements in C

### C program to find grade from given percent

``````#include<stdio.h>
int main()
{
float p;
printf("Enter percent: ");
scanf("%f",&p);
if(p>=90)
{
printf("A+");
}
else if(p>=80)
{
printf("A");
}
else if(p>=60)
{
printf("B");
}
else if(p>=40)
{
printf("C");
}
else
{
printf("D");
}
return 0;
}``````

### C++ program to find grade from given percent

``````#include<iostream>
using namespace std;
int main()
{
float p;
cout<<"Enter percent: ";
cin>>p;
if(p>=90)
{
cout<<"A+";
}
else if(p>=80)
{
cout<<"A";
}
else if(p>=60)
{
cout<<"B";
}
else if(p>=40)
{
cout<<"C";
}
else
{
cout<<"D";
}
return 0;
}``````

### Output of C C++ program to find grade from given percent

```Enter percent: 95
A+```
```Enter percent: 88
A```
```Enter percent: 62
B```
```Enter percent: 40
C```
```Enter percent: 25
D```

Share it to: