You are on page 1of 1

March 16, 2020

Activity No. 2

Instructions: Create a pseudocode and a flowchart for the following problems. Save the
file as PDF. After creating a pseudocode and flowchart, create Java program to
represent your algorithm.

Specifications: Font: Arial, Size: 12, Fully Justified

1. Create a program that accepts user input. The user inputs four integers and
determines if one of the inputs is the same or equal with another input. (Use
java Scanner)
Example: 1st Input: 25
2nd Input: 35
3rd Input: 25
4th Input: 60
Output: There are equal numbers
1st Input: 30
2nd Input: 32
3rd Input: 45
4th Input: 36
Output: There are no equal numbers
2. Create a program that enables the user to enter a decimal number. Print the
binary form, octal form, and the hexadecimal form of the number.
Example: Enter Decimal Number: 25
Output: Binary: 11001
Octal: 31
Hexadecimal: 19
3. Create a program that determines whether the user input is a Prime or
Composite number.

You might also like