0% found this document useful (0 votes)
6 views1 page

Lab4 GRPB

The document outlines three programming tasks: the first task involves creating a program to determine the number of days in a given month, accounting for leap years in February; the second task requires a menu-driven program to check if a number is even or odd and if it is positive or negative, utilizing a switch-case statement; the third task focuses on categorizing numbers based on their digit count, ranging from single to large numbers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

Lab4 GRPB

The document outlines three programming tasks: the first task involves creating a program to determine the number of days in a given month, accounting for leap years in February; the second task requires a menu-driven program to check if a number is even or odd and if it is positive or negative, utilizing a switch-case statement; the third task focuses on categorizing numbers based on their digit count, ranging from single to large numbers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Write a program that takes a month number (1-12) as input and displays the number
of days in that month. For February, ask for the year and determine if it's a leap
year to show 28 or 29 days.

2. Create a menu-driven program with the following options:


i. Check if a number is even or odd
ii. Check if a number is positive or negative
iii. Exit
Use a switch-case statement to handle the menu selections.

3. Write a program that categorizes a number as:


i. Single digit (0-9)
ii. Double digit (10-99)
iii. Triple digit (100-999)
iv. Large number (1000 or above)

You might also like