Welcome To Procoder
Welcome To Procoder
TASK
CONSTRAINTS
INPUT FORMAT
Integer to be tested
OUTPUT FORMAT
TIP-
The logic says that if a no. is power of 2, then in the binary representation, only
one bit of the no. can be 1 & rest are must be 0
SAMPLES
It is power of 2
It is not power of 2
Question2
TASK
TERMS OF AP.
Write a program to print first x terms of series 3N+2 which are not multiples of
4.N varies from 1 to last.
SAMPLE INPUT 1
10
SAMPLE OUTPUT 1
5 11 14 17 23 26 29 35 38 41
SAMPLE INPUT 2
SAMPLE OUTPUT 2
5 11 14 17
Question3
TASK
To swap two numbers without using third operand and that too in one statement.
CONSTRAINTS
INPUT FORMAT
OUTPUT FORMAT
First line should contain both input(a,b) and second line should contain its
swapped output(b,a).
SAMPLE 1:
Input-
16 32
Output-
32 16
SAMPLE 2:
Input-
10 20
Output-
20 10
Question4
TASK
CONSTRAINTS
INPUT FORMAT
OUTPUT FORMAT
Print the Square root of the number entered by the user of type integer.
SAMPLE 1
Input-
16
Output-
SAMPLE 2
Input-
10
Output-
33
Question5