Beruflich Dokumente
Kultur Dokumente
Add all natural numbers below one thousand which are multiples of 3 and 5
2. Find the largest palindromic number made from the product two 3-digit numbers
6. row 0: 1
row 1: 1,1
row 2: 1,2,1
row 3: 1,3,3,1
row 4: 1,4,6,4,1
row 5: 1,5,10,10,5,1
row 6: 1,6,15,20,15,6,1
....
....
.... so on
Observe the pattern in the above. Write a function which will compute the numbers in row n given n.
7. Write a function to compute the fibonacci sequence. Find the sum of all even fibonacci numbers under
4 million
8. How many Sundays fell on the first of the month during the twentieth century
Note: Twentieth century is 1 Jan 1901 to 31 Dec 2000. Remember to take care of leap years
9. How many letters would be needed to write all the numbers from 1 to 1000 in words
10. Indian currency has 1 rupee coins, 2 rupee coins, 5 rupee coins, 10 rupee notes,20 rupee notes, 50
rupee notes,
100 rupee notes, 500 rupee notes, and 1000 rupee notes. Write a function which takes a positive integer
as
input and prints out how many pieces of each denomination are contained in it.
For example: The input 2783 should give the following output