Lab 4
Lab 4
Research Faisalabad
Output:
Task#2
Write a program that inputs three integers, then display largest number with proper
statement and if user enters the same numbers, it should display that the numbers are
equal. The program should be completed by using conditional statements only.
Input:
Output:
Task#3
If the user inputs the ages of Ali, Aslam and Aqeel, write a program to determine the
youngest of the three using conditional statements.
Input:
Output:
Task#4
Write a program that inputs single character and three integers and then do the
following,
If user enters “s”, then perform addition of the three integers
If user enters “p”, then perform multiplication of the three integers
If user enters “a”, then perform average of the three integers
And if user enters any other character, it should display “Wrong Statement”
Input:
Output: