Object: - Write a program and algorithm and for temperature conversion from Kelvin temperature to Celsius temperature
Algorithm:-
Step (1):- Start
Step (2):- Declare the variable k, c as float type.
Step (3):- Read the value of variable k
Step (4):- c ← k-273
Step (5):- the value of c
Step (6):- Stop
Program:-
# include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
float k,c;
printf("Enter the value of kelvin temprature:");
scanf("%f",&k);
c=k-273;
printf("celsius temprature=%f",c);
getch();
}
----------------------------------------------------------------------------------
Output:-
Enter the value of kelvin temprature:500
celsius temprature=227.000000
0 Comments:
Post a Comment