Professional Documents
Culture Documents
Part - 5/10
1) Length of the String
Boundary Condition(s):
1 <= Length of S <= 1000
Example Input/Output 1:
Input:
hello
Output:
5
Example Input/Output 2:
Input:
pineapple
Output:
9
1
2) Middle Three Characters
Example Input/Output:
Input:
brinjal
Output
inj
2
3) Print Last Four Digits
Example Input/Output 1:
Input:
23847
Output:
3847
Example Input/Output 2:
Input:
23477234
Output:
7234
3
4) Discount - 20%
Example Input/Output 1:
Input:
29
Output:
23.20
4
Example Input/Output 1:
Input:
22 14
Output:
EVEN
Example Input/Output 2:
Input:
11 47
Output:
ODD
Example Input/Output 3:
Input:
34 97
Output:
MIXED
5
6) Sum of Two to Get Third Integer
Example Input/Output 1:
Input:
-1 2 3
Output
yes
Explanation:
-1 + 3 = 2
6
7) N Integers From N
Example Input/Output 1:
Input:
5
Output:
56789
7
8) Calculate Park Entrance Fee
Example Input/Output 1:
Input:
100 50
23
Output:
350
Example Input/Output 2:
Input:
30 10
45
Output:
170
8
9) Multiple of 30 Plus 1 or 2
Example Input/Output 1:
Input:
31
Output:
YES
Example Input/Output 2:
Input:
63
Output:
NO
9
10) Check if Multiple of N1 and N2
Example Input/Output 1:
Input:
8 32 64
Output:
yes
10