Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

10pts.

1. Write a program to check whether a number is even or odd.


2. Write a program to check whether a number is negative, positive or zero.
3. Write a program to find maximum between two numbers.

30 pts.

1. Simple Calculator using switch statement

2. GRADE AVERAGE PROGRAM


Create a program that will let the user input 5 grades then make the program compute the
average and display a message based on its value.

If average: ex. output:

Above 100 – Invalid grade English: 95

98 to 100 – With highest honors Math: 96

95 to 97.99 – with high honors Science: 94

90 to 94.99 – With honors Programming: 99

75 .89.99 – Passed Filipino: 96

Below 75 – Failed Average: 96 With High Honors

3. Write a program to input cost price and selling price of a product and check profit or loss.
Also calculate total profit or loss using if else. How to calculate profit or loss on any
product using if else.

Example
Input:
Input cost price: 1000
Input selling price: 1500

Output:
Profit: 500
50pts

1. Create a Program that will input 3 numbers and get the highest number and lowest
number.

80pts

DATE FORMATTER

Month Total days


January, March, May, July, August,
31 days
October, December
February 28/29 days
April, June, September, November 30 days

• Create a Program that will make the user input Month, Date and Year as integers then use
switch statement and concatenation to display it in this format:

• Ex. Output:

Month: 1 - If the user input 13 and above the program will output “Invalid Month”

Date: 13 - if the user input 32 and above the program will output “Invalid Date”

Now if the user input 2 in month and 29 in date check the year if it’s a leap year. Then if not
output “You Input invalid date. The Year you input is not a Leap year!”

Year: 2020

January 13, 2020

You might also like