0% found this document useful (0 votes)
35 views4 pages

Programming With C++: (TASK 3)

This document contains 3 programming tasks completed by Ahmed Fouad Mohamed with student ID 20190118 for the course EDE 125 under the supervision of Dr. Nour S. Bakr and Eng. Manar Fathy at the Biomedical Engineering Department of the Higher Technological Institute in the 10th of Ramadan City. Each task involves a C++ program to 1) print a grade based on a test score, 2) calculate payment based on hours worked, and 3) print a language based on its starting letter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views4 pages

Programming With C++: (TASK 3)

This document contains 3 programming tasks completed by Ahmed Fouad Mohamed with student ID 20190118 for the course EDE 125 under the supervision of Dr. Nour S. Bakr and Eng. Manar Fathy at the Biomedical Engineering Department of the Higher Technological Institute in the 10th of Ramadan City. Each task involves a C++ program to 1) print a grade based on a test score, 2) calculate payment based on hours worked, and 3) print a language based on its starting letter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Ministry of Higher Education

Higher Technological Institute

10th of Ramadan City

Biomedical Engineering Department

PROGRAMMING
with C++
[TASK 3]
Student Name: Ahmed Fouad Mohamed
ID: 20190118

Course Code: EDE 125


Group: (81)

Supervisor
Dr. Nour S. Bakr
Eng . Manar Fathy

1
#include <iostream>
using namespace std;

int main()
{
int ID;
cout << "Name:Ahmed Fouad Mohamed Waghe " << endl;
cout << "________________________________" << endl;
cout << "Enter ID : "; cin >> ID;
cout << "________________________________" << endl;
cout << " print actual grad in certain subject also print your total grad depend
on gpa " << endl;
cout <<
"_______________________________________________________________________________" <<
endl;
int score;
cout << "enter your test score :"; cin >> score;
switch (score/10)
{
case 10:
case 9: cout << "your grade is an A." << endl; break;
case 8: cout << "your grade is an B." << endl; break;
case 7: cout << "your grade is an C." << endl; break;
case 6: cout << "your grade is an D." << endl; break;
case 5:
case 4:
case 3:
case 2:
case 1:
case 0: cout << "your grade is an F." << endl; break;
default: cout<< "Error:score is out of range.\n";
}
cout << "coodbye." << endl;

2
#include <iostream>
using namespace std;

int main()
{
int ID;
cout << "Name:Ahmed Fouad Mohamed Waghe " << endl;
cout << "________________________________" << endl;
cout << "Enter ID : "; cin >> ID;
cout << "________________________________" << endl;
cout << " program reads hours work and equivealent payment " << endl;
cout << "____________________________________________________" << endl;
int hours;
double pay;
cout << "Enter hours : ";
cin >> hours;
if (hours <= 30)
pay = hours * 15;
else if (hours > 30 & hours <= 50)
pay = 30 * 15 + (hours - 30) * 20;
else if (hours > 50)
pay = 30 * 15 + 20 * 20 + (hours - 50) * 30;
else
cout << "invalid \n";
cout << "payment is : " << pay << "KD\n";
}

3
#include <iostream>
using namespace std;

int main()
{
int ID;
cout << "Name:Ahmed Fouad Mohamed Waghe " << endl;
cout << "________________________________" << endl;
cout << "Enter ID : "; cin >> ID;
cout << "________________________________" << endl;
cout << " SWITCH LANGUAGE " << endl;
cout << "_________________" << endl;
char latter;
cout << "enter the language frist latter " << endl;
cin >> latter;
switch (latter)
{
case 'A': cout << "Arabic" << endl; break;
case 'a': cout << "arabic" << endl; break;
case 'E': cout << "English" << endl; break;
case 'e': cout << "english" << endl; break;
default: cout << "error" << endl;
}
}

You might also like