Assignment1
Assignment1
Assignment: 1
• Work out all programs and report the outputs during the lab class of 09-Jan-2024.
• If the assignment sheet is not complete, do the rest as homework.
• Put all your codes in a single pdf to upload in the Google Classroom before the
next day’s lab. Write your name, department, enrollment number, group number
on a top sheet.
1. Write a C program to multiply three numbers and print the result. Here two
numbers have to be taken through assignment statements and the third as a
user input.
2. Area of a triangle is given by the formula A = √S(S-a) (S-b) (S-c) where a, b, and
c are the sides of the triangle and 2S = a + b + c. Write a C program to compute
the area of the triangle by taking the values of a, b, and c as user input from the
console.
3. Write a C program to compute the area and circumference of a circle for a given
radius, r. Here radius, r has to be taken as a SYMBOLIC CONSTANT.
4. Write a C program for temperature conversion. Use the following formula for
conversion.
(a) Convert the equivalent temperature in Fahrenheit (f) to Celsius (c), where f
has to be read as a user input.
(b) Convert the equivalent temperature in Celsius (c) to Fahrenheit (f), where c
has to be read as a user input.