lab report
lab report
Submitted By
Name : Siam Khan
ID : 0432410005081039
1. Convert and Print Celsius Temperature to Fahrenheit
#include <stdio.h>
int main() {
float celsius, fahrenheit;
printf("Enter temperature in Celsius: ");
scanf("%f", &celsius);
fahrenheit = (celsius * 9 / 5) + 32;
printf("%f C = %f F\n", celsius, fahrenheit);
return 0;
}
Output :
2. Write a program in C to find the circumference of a circle using
user input
#include <stdio.h>
int main() {
float radius, circumference , PI = 3.1416;
circumference = 2 * PI * radius;
return 0;
}
Output :
3. Write a program in C to find the area of at triangle using user input
#include <stdio.h>
int main() {
float base, height, area;
return 0;
}
Output :