0% found this document useful (0 votes)
22 views

ACTIVITY 3 Programming

The document contains programming assignments for a student. The assignments involve writing programs to: 1) Input 5 numbers and display the highest; 2) Input a number and print if it is divisible by 5; 3) Accept a date as numbers and display the full date; 4) Input "m" or "f" and print the corresponding greeting; 5) Input an age and print if the user is a minor or adult. The student is instructed to use if/else and switch statements to solve the problems.

Uploaded by

Naethan Velarde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

ACTIVITY 3 Programming

The document contains programming assignments for a student. The assignments involve writing programs to: 1) Input 5 numbers and display the highest; 2) Input a number and print if it is divisible by 5; 3) Accept a date as numbers and display the full date; 4) Input "m" or "f" and print the corresponding greeting; 5) Input an age and print if the user is a minor or adult. The student is instructed to use if/else and switch statements to solve the problems.

Uploaded by

Naethan Velarde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

ACTIVITY #3:

Name: DIAZ, NAETHAN PAUL V. | Course Yr & Sec: BSME – 2A | Date: 10/24/2023

1. Write a program that will input five (5) numbers and display the highest number. Assume no equal
values. Use if/else if/else statement and switch statement.

2. Write a program that will input a number and will print “Divisible” if the number is divided by 5,
otherwise print “Not Visible”. Use if/else if/else statement and switch statement.

3. Write a program that will accept dates written in numerical form and then display them as a complete
form. For example, the input: 6 8 1978 the output should be June 8, 1978. Use if/else if/else statement
and switch statement.
4. Write a program that will ask the user to input a character “m” or “f” and then it will display “Hello Sir”,
if the input is “m” otherwise “Hello Madam”. Use if/else if/else statement and switch statement.

5. Design a program that will ask the user to input age if the age is less than 18 it will display a message
“You are still a Minor”. But if the age is greater than or equal to 18 it will display a message “You are
already an Adult.” Use if/else if/else statement and switch statement.

You might also like