Skip to main content

Temperature Convertor

#include<iostream>     // it is  a library used for display
#include<conio.h>      // its is also a library used for input output statement
using namespace std;

main()
{

float c,f ;   // as i discussed earlier float is used for floating values like value is decimel so two variable are take
 cout<<"Enter the temperature in Fahrenheit  ? :"; // its just comment whatever you want can add here within "" after cout
 cin>>f;                                         // giving a value which will convert the program to Fahrenheit
c= (f-32)*5.0/9.0;      // it is the formula to convert to fahrenheit
cout<<"Temperature in celsius = "<<c; // here its show the value save in the c throgh the formula  
}

/* Here is your temperature converter to farhrenheid is ready */

Comments

Popular posts from this blog

Variable And INT

#include<iostream>     // it is  a library used for display #include<conio.h>      // its is also a library used for input output statement using namespace std; main() { int a;                           /* what is (int) here and what is (a) here                    the two question which was in mind of me                    when i was in first semester*/                   } /* Here there are two thing 2) int 1) a: is basically a Variable which represent a storage or memory in computer like if we define (int a) then a memory is located in computer to store the value of a it can be changed during execution of program but i will define it later 2) int 2) INT : int basically specifies the type of da...

Arithm

/* c++ is world popular language you can do every thing with the help of this but after learning it today  lecture is on making calcultor but its mini hahahha c++ have some Arthmetic operator  like + ,- ,*, /, % today i will teach you how to use these operator in c++*/ #include<iostream> #include<conio.h> using namespace std; main() { int r;  // declaring variable of data type int r=2;    // assigning values to that variable int b;  //declaring another varaible ; b=4;    // assigning value to that variable int sum; // declaring another varaible to hold the sum of the two variables sum=r+b;  // here i am adding these two variables cout<<sum;  //here is output of sum variable } /* CONCEPT: you are aware of assigning values to variable but here is another concept  on line 21 i declare int sum on line 23 the addition of both r and b are assign  to the sum and at the en...