Computer Science, asked by archanadeaf, 2 months ago

2.
Write a program that will accept a mark and assign letter grade according to
the following table
Grade
Mark
А
>= 90
B.
>= 80 but < 90
с
>= 70 but < 80
o O LL
D
>= 60 but < 70
< 60
3.
Write a program that will print sum of Nintegers entered by the user.
4.
Write a program to generate the members of fibonacci series upto 500.
5.
Write a program to reverse a given number.​

Answers

Answered by Berseria
6

Answer:

Required Program :

2) To find grade on scores.

Program in C++ :

#include <iostream>

Using namespace std;

int main ( )

{

int score ;

cout <<"Enter the scores :" ;

cin >> score;

if (score >= 90 )

cout <<" A grade";

else if ( score>= 80 )

cout <<"B grade";

else if ( score >= 70 )

cout <<"C grade ";

else if (score >=60 )

cout <<"D score";

else

Cout<<'E grade" ;

return 0;

}

Output :

Enter the score = 85

B grade

3 ) To find sum of 2 integers.

#include <iostream>

Using namespace std;

int main ( )

{

int a,b,sum ;

cout <<" Enter 2 numbers :";

cin >> "a,>>";

sum = a + b ;

cout << " Sum of 2 numbers : "<<sum ;

return 0;

}

Output :

Enter 2 numbers : 4 7

Sum of 2 numbers : 11

Similar questions