Professional Documents
Culture Documents
Hello
Hello
Hello
MAX MARKS: 60
1. print the pattern
*
*
*
*
*
*
If input is 5.
INPUT
An integer n.
OUTPUT
The above pattern .
2. Given a string, print the sum of numbers in the string
INPUT
Enter the string
Eg.
-> e2ir55g9
-> a4b0c11
OUTPUT
->66(2+55+9)
->15(4+0+11)
3. Print all the possible combination of numbers in an array.
INPUT
An integer n, size of array.
Read values into the array.
Eg.
->n=2
56
(5)
(5)
->n=3
123
OUTPUT
->{5},{6},{5,6}
->{1},{2},{3},{1,2}{1,3},{2,3},{1,2,3}
(10)
(10)
(15)
Eg.->12345
->34261
->54321
OUTPUT
(Print the next greater number by using these digits.)
Output->12354
->34612
->not possible
(15)