Learn C++ beginer programs

July 5, 2009

Write a program to convert temperature in Celcius to temperature in Fahrenheit

Filed under: c to f,cin,convert,cout,CTOF,temperature — snehilkhanor @ 5:01 pm
Temperature is taken as input in celcius by user and then converted into Fahrenheit and displayed as output

Select To use this code as it is.. select and copy paste this code into code.cpp file :)
  1. #include <iostream.h>
  2. #include <conio.h>
  3. void main()
  4. {
  5. clrscr();
  6. int c,f;
  7. cout<<”enter temperature in celcius:. “;
  8. cin>>c;
  9. f=1.8*c+32;
  10. cout<<”Temperatur in Farenheit= “<<f;
  11. getch();
  12. }

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.