1)
Input : N = 4
Output :
a b c d
b c d
c d
d
b c d
c d
d
c d
d
Input : N = 2
Output :
a b
b
Input : N = 3
a b c
b c
c
b c
c
2)
Check each word with next word if in next word alphabets is present then remove it and last word as it is.
Input : I am a Student.
Output : I m a Student.
Input : You are participate of programming competition.
Output : You participate f prgrammg competition.
3)
Take Number in this Format 999-99-9999-9999999
Multiply with 1 and 3 accordingly
Sum of that number modulo by 10
then attach that digit in last of original number.
Input : 999-99-9999-9999999
Output : 999-99-9999-9999999-3
4)
Take number from user then reverse of that number and last digit is assign to n1 and last two digit will assign to n2 and last three digit will assign to n3 and reverse number assign to n4.
sum = n1 + n2 + n3 + n4;
check if it is prime or not.
Input : 1234
Output : It is Prime.
Download Word File
Post a Comment