Sunteți pe pagina 1din 1

Khwaja Fareed University of Engineering and Information Technology

Assignment 2

Lab Instructor Engr. Hussain Khan Program Name BSME-17


Course Computer System & Programming Lab
Due Date February 5, 2019 Total Marks 10

Question 1: Write a C++ program that uses a while statement to determine and print the largest
number of 5 numbers input by the user.
Question 2: Write a C++ program that uses a while statement to convert binary number into
decimal.
Question 3: Write a C++ program that uses a while statement to Display a Number entered by
user with its Digits Reversed.
Example: The given number 1234 with its digits reversed is 4 3 2 1
Question 4: Write a C++ program that uses a while statement to determine the factorial of a
number input by the user.
Question 5: Write a C++ program that inputs Grades and credit hours of courses and print Grade
Point Average of semester. (Program must ask for all courses in your current semester)

S-ar putea să vă placă și