Snovasys

☞ Write a program to print following pattern (March,2019)
Sample Input
253
Sample Output
2
2 5
2 5 3

5
5 3

3
☞ Input a string from the user and print the number of iterations it will take to make the string unique for each iteration we need to remove adjacent common characters from the string. (March,2019)
Sample Input
aabccda
Sample Output
2
☞ Write a program to print following pattern (Jan,2020)
Sample Input1
3
Sample Output1
* 2 3
* 5 *
7 * *
Sample Input2
4
Sample Output2
* 2 3 *
5 * 7 *
* * 11 *
13 * * *

Click Here for Solution

No comments:

Post a Comment

Total Pageviews