Java - 2
Java - 2
Description
You need to print "Masai School" on a line, and print "A Transformation in Education" on a new line.
Input
No input
Output
Print "Masai School" on a line, and Print "A Transformation in Education" on a new line.
Sample Input 1
No Input
Sample Output 1
Masai School
A Transformation in Education
2. Multiply by 50 Ended
Description
● Multiply the number stored in the variablenumberby 50, and print the result obtained
Input
The first and the only line of the input contains the number stored in the variablenumber
Constraints
1 <= N <= 20
Output
Print a single number, the result obtained by multiplying it by 50
Sample Input 1
2
Sample Output 1
100
Hint
In the sample test case, the value stored in the variablenumberis 2. After, multiplying by 50, the answer
3. Product of Six
Description
You are given six numbers, stored in variables with the following names
Input
The first and the only line of the input contains 6 numbers stored in the variablesone, two, three,
Constraints
1 <= N <= 20
Output
Print a single integer, denoting the product of the six numbers given.
Sample Input 1
1 2 3 4 5 6
Sample Output 1
720
Hint
● one = 1
● two = 2
● three = 3
● four = 4
● five = 5
● six = 6
After, multiplying the six numbers, we get the following result1*2*3*4*5*6 = 720, which is the required
answer
4. Sum of five
Description
You are given five numbers stored in variables with the following names
Input
The first and the only line of the input contains five values, stored in the variablesone, two, three,
four, five
Output
Print the sum of the five values stored in the variablesone, two, three, four, five
Sample Input 1
1 2 3 4 5
Sample Output 1
15
Hint
In the sample test case, the values stored in the variables areone = 1, two = 2, three = 3, four =
4, five= 5
The sum of the values is1 + 2 + 3 + 4 + 5 = 15, which is the required sum
Description
Input
The first and the only line of the input contains the number N.
Constraints
1 <= N <= 30
Output
Sample Input 1
2
Sample Output 1
8
6. Square and Sum Ended
Description
● You are given three numbers, stored in variables with the following names
● You have to find the square of the three numbers, and find the sum of their square values
Input
● The first and the only line of the input contains, the values stored inone, two, three
Output
● Print the sum of the squares of the values stored inone, two, three
Sample Input 1
1 2 3
Sample Output 1
14
Hint
In the sample test case, the value stored inone = 1, two = 2, three = 3.
one = 1 * 1 = 1
two = 2 * 2 = 4
three = 3 * 3 = 9
The resultant sum becomesone + two + three = 1 + 4 + 9 = 14, which is the required answer.
7. Find X Ended
Description
1. X is multiplied by 3
Input
Input:
Constraints:
Output
Output:
Sample Input 1
3
Sample Output 1
19
Hint
Explanation
The value of X = 3, after multiplying with 3, X becomes 9, and then after adding 10, it becomes 19. So, the
output is 19
Description
You are given a number, stored in a variable with the namenumber. Perform the following operations on
2. Add 7 after it
3. Subtract 10 from it
After performing all the above operations, print the updated value
Input
The first and the only line of the input contains the number, stored in the variablenumber
Constraints
1 <= N <= 30
Output
Print a single integer, denoting the updated value of the number stored, after performing all the operations,
Sample Output 1
9
Hint
● Finally, we subtract 10 from it, so the value becomes 9, which is the final output
9. Square It Ended
Description
value](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow)
Input
Input Format
Constraints
N<100
Output
Sample Output 1
49
Description
You are given five numbers stored in variables with the following names
Input
The first and the only line of the input contains five values, stored in the variablesone, two, three,
four, five
Output
Print the product of the five values stored in the variablesone, two, three, four, five
Sample Input 1
1 2 3 4 5
Sample Output 1
120
Hint
In the sample test case, the values stored in the variables areone = 1, two = 2, three = 3, four =
4, five= 5
The sum of the values is1 * 2 * 3 * 4 * 5 = 120, which is the required sum
Description
You are given five numbers, stored in the variables with the following names
● All the values are doubled, that is, they are multiplied by 2
Find the sum of the values stored inone, two, three, four, after the above operation are performed
Input
● The first and the only line of the input contains the values stored in variablesone, two,
Output
● Print the sum of the values stored inone, two, three, four,five, after the required
operation is performed
Sample Input 1
1 2 3 4 5
Sample Output 1
30
Hint
In the sample test case, the values stored in the variables are as follows
one = 1*2 = 2
two = 2*2 = 4
three = 3*2 = 6
four = 4*2 = 8
five = 5*2 = 10
Description
You are given 7 numbers A, B, C, D, E, F, G. Find out the product of (A + B + C) and (D + E + F + G).
Input
Constraints
1 <= A, B, C, D, E, F, G <= 30
Output
Sample Output 1
132
Hint
= 132