Computer Programming - I (MCT-143) Lab Session 3: Task 1
Computer Programming - I (MCT-143) Lab Session 3: Task 1
Lab Session 3
Task 1:
Write a C++ program to find the area and volume of the sphere. The formulas of area and volume of
sphere are and
Sample output is:
Task 2:
Write a C++ program to convert Centigrade into Fahrenheit. Formula is ( )
Sample output is:
Task 3:
Write a C++ program that will take a three digit number as input and will display three digits in a column
and also show their sum. (At present we can assume that user is sensible enough and will enter three digits
number. Later on in coming lab sessions we will see how to check that user has actually entered three digits
number and if it is not a three digits number, how to ask again for the number)
Sample output is:
Task 4:
Write a C++ program that will take two integers as input and will display first integer as a percentage of
other.
Sample output is: