-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatharva.cpp
More file actions
54 lines (28 loc) · 718 Bytes
/
atharva.cpp
File metadata and controls
54 lines (28 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include<iostream>
using namespace std;
int main()
{
int grade ,i;
int array[] = {40,45,50,55,60,65,70,75,80,85,90,95,100};
cout<< "enter your grade ";
cin>>grade;
for (i=0;i<13;i++)
{
if (grade<40)
{
cout<<"Your grade is "<<grade<<"No Rounding ";
break;
}
if(grade==array[i])
{
cout<<"Your grade is "<<grade<<"no Rounding";
break;
}
if (grade- array[i]< 3 && grade - array[i]> -3 )
{
/* code */ cout<< "your grade is rounded to"<<array[i];
break;
}
}
return(0);
}