Ques 1.1) Write a program to print a semicolon without using semicolon else where in the program ???
Ques 1.2) Write a program to print given pyramid
ABCDEFEDCBA
ABCDE_EDCBA
ABCD___DCBA
ABC_____CBA
AB_______BA
A_________A
AB_______BA
ABC_____CBA
ABCD___DCBA
ABCDE _EDCBA
ABCDEFEDCBA
Level 2
Ques 2.1) Write a program to double a number without using any arthimetic operator(+,-,*,/,++,--,% etc) ???
Ques 2.2) Write a method that takes a string as input, and outputs that string with the words in reverse order. Punctuation should remain in its place (i.e. attached to whatever word it was originally with)
Example 1 :
Input: "My this is a nice day!"
Output: "day! nice a is this My"
Example 2:
Input: "There is a house in New Orleans, they call the rising Sun."
Output: "Sun. rising the call they Orleans, New in house a is There"
Level 3
Ques 3.1) Write a program that, given an even integer greater than two, (but no greater than one thounsand), produce as output every pair of prime number that sum to it.
eg :38
19+19
7+31
Ques 3.2) A number of “Cats” got together and decided to kill between them 999919 mice. Every cat killed equal number of “mice”. Write a program to find number of cats.

No comments:
Post a Comment