/*
Accept the temperature in Fahrenheit and print it in Celsius and kelvin using C.
*/
#include<stdio.h>
main()
{
int f;
float c,k;
printf("Enter f - ");
scanf("%d",&f);
c=(f-32)*(0.55555555555);
printf("Temperature in Celsius = %f\n",c);
k=c+273;
printf("Temperature in kelvin = %f\n",k);
}
This is more like an initiative to digitize the basic codes which are required to be executed while learning computer science, computer application, information technology and computer engineering at Indian universities. As I graduated from the University of Pune, the list of codes I am going to publish are the one which I learned and executed while studying at my graduation.
Monday, 12 February 2018
Temperature Conversion using C
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment