Number of rectangles
NUMBER OF RECTANGLES Q. A rectangular grid measuring 3 by 2 contains eighteen rectangles. For each testcase an integer target would be...
Vowels, Consonants, Digits and Spaces in a String
Q. Design a program to count the vowels, consonants, digits and spaces in a given string. SAMPLE INPUT : Hello World. I am XYZ and I am...
The Matchstick Game!
Q. In a game, of two players(player1-user .. player 2 -computer), there are 21 matchsticks.... Each player is made to pick up any number...
Calculate number of trailing zeros in n!
Q.There is a single positive integer T on the first line of input. It stands for the number of numbers to follow. Then there are T lines,...
nPr and nCr (Using Recursion)
Q. Design a program to find the Permutation (nPr) and Combination (nCr) of 'r' objects out of 'n' distinct objects using Recursion....
Function returning multiple values
Usually a function can return only a single value through 'return' keyword. We intend to design a function that returns multiple values...