ةيدوعسلا ةيبرعلا ةكلمملا Kingdom of Saudi Arabia يلاعلا ميلعتلا ةرازو

advertisement
Kingdom of Saudi Arabia
Ministry of Higher Education
Majmaah University
Computer Science and Information Technology College
‫المملكة العربية السعودية‬
‫وزارة التعليم العالي‬
‫جامعة المجمعة‬
‫كلية علوم الحاسب وتقنية المعلومات‬
Assignment Due by Sun Sep 23
Assignment 1

Write a complete C++ program to print your name.
 Write a complete C++ program that read two numbers from user , then print their sum;
Enter first number please
2
Enter second number please
5
The sum is: 2+5=7

Write a complete C++ program that read 4 numbers from user, print their sum and their
average.

Write a complete C++ program that asks the user to enter his salary and employment rank
as following :'S' for a Secretary, 'T' for a Treasurer and 'M' for a manager, then print the
salary with an added 100 S.R bonus if the user is a secretary ,200 S,R for a treasurer,300
S.R for a manager.
Example output:
Enter your salary : 5000
Enter S ,T,M: T
Your salary is 5200
1
Kingdom of Saudi Arabia
Ministry of Higher Education
Majmaah University
Computer Science and Information Technology College
‫المملكة العربية السعودية‬
‫وزارة التعليم العالي‬
‫جامعة المجمعة‬
‫كلية علوم الحاسب وتقنية المعلومات‬
Guidelines:
1. No Late assignment will be accepted be advised to submitted early.
2. If there is any question, please ask me via r.alabdan@mu.edu.sa
3. Submit your assignment via email write your Name, Group and Course in the
subject line of email. Any emails without subject title will be ignored!
4. After you make sure from your code copy it in a word document and make a
screen shot from your run screen.
1. Windows: press Fn + PrntScr then paste it in Painting apps and save it as
jpg.
2. Mac: press cmd+shift+4 then take a shot from the screen
5. Assignment score is 10
Thank you
Rana Al Abdan
2
Download