Sunday, 6 March 2016

PROGRAMME TO FIND TEMPERATURE IN CELCIUS AND KELVIN


#include<stdio.h>
main()
{
float f,c,k;
printf("Enter temperature in farenheit");
scanf("%f",&f);
c=5/9*f-32;
k=c+273.15;
printf("Temperature in celcius=%f Temperature in kelvin=%f",c,k);
}


ASSIGNMENT NO 1)

TO DEMONSTRATE THE USE OF DATA TYPES, SIMPLE OPERATORS AND EXPRESSIONS

You should read following topics before starting this exercise

      1. 
Problem solving steps – writing algorithms and flowcharts.
2. Different basic data types in C and rules of declaring variables in C.
3. Different operators and operator symbol.

4. How to construct expressions in C, operator precedence.

No comments:

Post a Comment