NeXus'11 - Bits & Bytes
1 (A).Write a program to print the magic square for the given order(odd).
OR
1 (B).Write a program to print pascal triangle for the given order.
Eg. For order = 4
1
1 1
1 2 1
1 3 3 1
2.Print the following pattern for the given order.
ORDER = 4
1 2 3 4
12 13 14 5
11 16 15 6
10 9 8 7
3.Consider the currency system in which there are notes of six denominations,namely
Re. 1, Rs. 2, Rs. 5, Rs. 10,Rs. 50,Rs. 100
If a sum of Rs.N is entered through the keyboard, write a program to compute the
smallest number of notes that will combine to give Rs.N
4.Two dates are entered through the keyboard in dd,mm,yyyy format. Write a program
to find out the difference in these two dates in terms of number of days.
5.Write a program that, for all positive integers i,j,k and l from 1 through 100,
find and print all combination of i,j,k and l such that i+j+k=l and i<j<k<l;
6.Write a program which finds a four digit number AABB which is a perfect square.
A and B represent different digits.