/** CPU Tutorial 2. Fundamentals of 'C' >> Question 1 : C Program to convert temperature from Fahrenheit to Celsius and vice versa. */ #include<stdio.h> // including standard input output library OR header void main() // starting of main function. { float fahrenheit,celsius; // Declaration of variables with type float int choice; // Declaration of variables with type int printf("1: Convert temperature from Fahrenheit to Celsius."); // Simple print statements printf("\n2: Convert temperature from Celsius to Fahrenheit."); printf("\nEnter your choice (1, 2): "); scanf("%d",&choice); // compile time initialization of choice variable if(choice ==1) // if..else if conditional statement. { printf("\nEnter temperature in Fahrenheit: "); ...
Posts
Showing posts with the label CPU Tutorials