C Lab Exercises 1
C Lab Exercises 1
#include <stdio.h>
int main() {
return 0;
OUTPUT:
Hello, John!
PROGRAM 1.B
#include <stdio.h>
int main()
int choice;
scanf("%d", &choice);
switch(choice)
case 1:
scanf("%f", &temperature);
convertedTemperature = fahrenheitToCelsius(temperature);
break;
case 2:
scanf("%f", &temperature);
convertedTemperature = celsiusToFahrenheit(temperature);
break;
default:
return 0;
OUTPUT:
PROGRAM 1.C
#include <stdio.h>
int main()
largest = num1;
largest = num2;
else
largest = num3;
}
printf("The largest number is: %d\n", largest);
return 0;
OUTPUT:
PROGRAM 1.D:
#include <stdio.h>
#include <math.h>
int main()
int choice;
scanf("%d", &choice);
switch(choice)
case 1:
break;
case 2:
scanf("%f", &radius);
area = areaCircle(radius);
break;
case 3:
break;
default:
}
return 0;
OUTPUT: