ANAS Lab Task (PF Theory)
ANAS Lab Task (PF Theory)
Assignment 1
Name: M. Anas Farooqui
Roll no:103
Output:
Output:
Programming Fundamentals
Assignment 1
Output:
Output:
Output:
Output:
Output:
Code:
Output:
12. Problem: Ask the user for his/her age and display the
message according to the following criteria:
If age is less than 16, display "You can't drive."
age is less than 18, display "You can't vote."
age is less than 25, display "You can't rent a car."
age is 25 or over, display "You can do anything that's legal.".
Programming Fundamentals
Assignment 1
Output:
Output:
Output:
Output:
Programming Fundamentals
Assignment 1
Output:
Output:
Programming Fundamentals
Assignment 1
19. Problem : Write a C++ program to input month number
and print number of days in that month using switch case
structure.
Output:
Programming Fundamentals
Assignment 1
20. Problem : Write a C++ program to input day number
between 1 and 7 and print day of week using switch case
structure.
Output: