Question 1
Take two numbers a,b and return the bigger number.
Constraints:
0 <= a,b <= 1000
Input:
Two numbers - a,b each in a new line
Output:
Bigger number about a,b
Example: Input:
3
5
Output:
5
Question 2
Take a number and return "ODD" if the number is odd and "EVEN" if the number is even
Constraints:
0 <= number <= 10000
Input:
An integer
Output:
A single line with the string "ODD" if the input is an odd number and "EVEN" if the input is even Example: Input:
22
Output:
EVEN
Question 3
Take an integer as input and return "POSITIVE" if the integer is positive, "NEGATIVE" if the integer is negative and "ZERO" if the integer is zero.
Constraints:
-10000 <= input <= 10000
Input:
An integer
Output:
A single line containing a string "POSITIVE" if the input is positive, "NEGATIVE" if the input is negative and "ZERO" if the input is zero.
Example: Input:
12
Output:
POSITIVE
Question 4
Take an integer and return "YES" if the input is divisible by 3 or 5 or both. "NO" in all other cases
Constraints:
0 <= input <= 1000
Input:
An integer
Output:
A single line with a string "YES" if the input is divisible by 3 or 5 or both. "NO" in all other cases.
Example: Input:
12
Output:
YES
Question 5
Take an integer and return its absolute value.
Constraints:
-1000 <= input <= 1000
Input:
An integer
Output:
Absolute value of the input integer.
Example: Input:
-12
Output:
12
Question 6
Take 3 distinct integers a,b,c and return the integer of largest value.
Constraints:
0 <= a,b,c <= 1000
Input:
Three integers each in a seperate line
Output:
A single integer with the largest value among the input.
Example: Input:
2
3
4
Output:
4
Question 7
Take 4 distinct integers a,b,c, d and return the integer of largest value.
Constraints:
0 <= a,b,c, d <= 1000
Input:
Four integers each in a seperate line
Output:
A single integer with the largest value among the input.
Example: Input:
2
3
10
4
Output:
10
Question 8
Take a 4 digit integer denoting a year and print out "YES" if it is a leap year and "NO" if it is not a leap year.
Constraints:
1000 <= input <= 9999
Input:
A single line with a four digit integer denoting the year
Output:
A single line with string "YES" if the input year is a leap year and "NO" if it is not.
Example: Input:
2022
Output:
No
Question 9
Take an integer ranging from 0 - 6 as input and print out the corresponding weekday. 0 corresponds to Sunday and 6 corresponds to Saturday.
Constraints:
0 <= input <= 6
Input:
A single integer from 0 to 6
Output:
A single line with string containing the weekday corresponding to the input.
0 -> Sunday
1 -> Monday
2 -> Tuesday
3 -> Wednesday
4 -> Thursday
5 -> Friday
6 -> Saturday
Example: Input:
1
Output:
Monday
Question 10
Check if a number is even or odd and print it out. Use switch case to solve the problem.
Constraints:
0 <= input <= 1000
Input:
An integer
Output:
A single line with string containing the weekday corresponding to the input.
EVEN if the integer is even
ODD if the integer is odd.
Example: Input:
12
Output:
EVEN