Assignment 1:
1. WAP to calculate area of a triangle using Heron’s formula[area=sqrt(s*(s-a)*(s-b)*(s-c)) use **]
2. WAP to perform addition, subtraction, multiplication, division, integer division and modulo
division on two integer numbers.
3. WAP to calculate area and circumference of a circle.
4. WAP to print the digit at one’s place of a number.
5. WAP to convert temperature in Fahrenheit to Celsius.
6. WAP to calculate the bill amount for an item given its quantity sold, value, discount and tax.
7. WAP to swap two numbers using a temporary variable.
8. WAP to calculate simple interest.
9. WAP that prompts user to enter his first name and last name and then displays a message
“Greetings!!! First name Last name
10. Write a program that takes input from the user as an amount of money in rupees and print how
many 500, 200, 100, 50, 2 and 1 rupee’s notes will be required to get the amount. A Sample Test
run of the above application is shown below:
Output
Enter the amount 3245
Rs 500=6
Rs 200=1
Rs 100=0
Rs 50=0
Rs 20=2
Rs 10=0
Rs 2=2
Rs 1=1