Tuesday, January 26, 2016

Tempreture conversion from celsius tempreture to kelvin tempreture.

OBJECT: - Write a program and algorithm for temperature conversion from Celsius temperature to kelvin temperature.

Program:- 
# include<stdio.h>
#include<conio.h>
void main()
{
int c,k;
clrscr();
printf("Enter the value of calsius temp.:");
scanf("%d",&c);
k=c+273;
printf("kelvin temp.=%d",k);
getch();
}

Algorithm

Step (1):- Start
Step (2):- Declare the variable c, k as integer type 
Step (3):- Input value a & b
Step (4):- k ← c + 273
Step (5):- Write the value of k
Step (6):- Stop 

-----------------------------------------------------------------------------------------------------------

Output:-

Enter the value of calsius temp.:10
kelvin temp.=283

0 Comments:

Post a Comment