marks of a student and then prints his grade according to following criteria a

# Marks of a student and then prints his grade

This preview shows page 1 - 4 out of 5 pages.

marks of a student and then prints his grade according to following criteria a.If marks >= 90 then A+ b.If marks >= 80 and < 90 then A- c.If marks >= 70 and < 80 then B+ Bahria University Lahore Campus Department of Computer Sciences d.If marks >= 60 and < 70 then B- e.If marks >= 50 and < 60 then C f.If marks >= 40 and < 50 then D g.Other wise F GradeTask no 1 :Write a program to print Hello Message.#include<iostream>using namespace std;int main(){cout << "Hello World." << endl;system("pause");return 0;}Task no 2#include<iostream>using namespace std;int main(){cout << "1\n2\n3\n\4\n5\n." << endl;system("pause");return 0;}Task no 3:Write a program to print 5 * using cout. #include<iostream>using namespace std;int main(){cout << "*****" << endl;system("pause");return 0;}Task no 4:Write a program that takes two integer values from user and displays their sum. #include<iostream>using namespace std;int main(){int num1;int num2; int result;cout <<"Enter First number: " << endl;cin >> num1;cout << "Enter Second number" << endl;cin >> num2;result = num1 = num2;cout << "The Sum of two numbers is: " << result << endl;system("pause");return 0;}Task no 5:Write a program that takes radius of a circle from user as input and thencalculates area of the circle using formulae #include<iostream>using namespace std;int main(){float area, radius;cout << "Enter the radius of the circle: " << endl;cin >> radius;area = 3.14 * radius * radius;cout << "Area of the Circle is: " << area <<  #### You've reached the end of your free preview.

Want to read all 5 pages?

• Fall '18
• Zia Ul Rehman
• Fahrenheit, Carriage return, Bahria University, Department of Computer Sciences, Mr. Zia Ul Rehman
• • • 