1. Swap two values stored in two different variables.

2. Check whether an entered number is negative, positive or zero.

3. Check whether an entered year is leap year or not.

4. Write a program that asks the user to type in two integer values at the terminal. Test these two numbers to determine if the first is evenly divisible by the second, and then display an appropriate message at the terminal.

5. Write a program that accepts two integer values typed in by the user. Display the result of dividing the first integer by the second, to three-decimal-place accuracy. Remember to have the program check for division by zero.

6. Write a program that takes an integer keyed in from the terminal and extracts and displays each digit of the integer in English. So, if the user types in 932, the program should display nine three two. Remember to display “zero” if the user types in just a 0.

7.  Input marks of five subjects Physics, Chemistry, Biology, Mathematics and Computer. Calculate percentage and grade according to following:

             Percentage >= 90% : Grade A

             Percentage >= 80% : Grade B

             Percentage >= 70% : Grade C

             Percentage >= 60% : Grade D

             Percentage >= 40% : Grade E

             Percentage < 40% : Grade F 


                    Answer click here.