Assignment C CBCA104 2024 PART I
Assignment C CBCA104 2024 PART I
Practical Assignments
‘C’ Programming Lab.
PART A
1. Write an algorithm to calculate simple interest, mentioning input of P,R,T from
the user.
2. Design an algorithm and flowchart to display area and circumference of circle.
3. Write an algorithm to find the roots of a Quadratic equation.
4. Write an algorithm to convert the temperature from Fahrenheit to Celsius
( C= F-32 / 1.8 )
5. Write an algorithm to determine a student’s final grade and indicate whether it is
passing or failing. The final grade is calculated as the average of four marks.
PART B
5. WAP to calculate grade of a student as per the following specifications using multiple
if statement , else if ladder statement and switch case statement.
Per Grade
>80 A+
70 –79 A
60 – 69 B
50 – 59 C
<50 Fail
7. An Electricity board charges the following rates for the use of electricity: for the
first 200 units 80 paise per unit: for the next 100 units 90 paise per unit: beyond
300 units Rs 1 per unit. All users are changed a minimum of Rs. 100 as meter
charge. If the total amount is more than Rs 400, then an additional surcharge of
15% of total amount is charged. Write a program to read the name of the user,
number of units consumed and print out the charges.
8. WAP to print highest number among three numbers.