Welcome. In this instructable you will learn to make a simple non- graphical c++ program. The program will convert celsius to farenheit.

Step 1: Making it!!!

So lets start making it. These are the codes for making it :



int c, f;
cout << "Welcome, this is a program to covert celsius to farenheit\n\n\n";
cout << "Enter the degree in celsius: ";
cin >> c;
f = c * 1.8 + 32;
cout << "The degree in farenheit is " << f;
return 0;

<p>can u do this on notepad?</p>
Why not explain the code a little bit more. And I think you got this code out of Beginning Programming with C++ for Dummies
Had to find out how to do it in linux. <br> <br>#include <br>#include <br>using namespace std; <br> <br>main() <br>{ <br> <br>std::system ( &quot;clear&quot; ); <br> <br>int c, f; <br>cout &lt;&lt; &quot;Welcome, this is a program to covert celsius to farenheit\n\n\n&quot;; <br>cout &lt;&lt; &quot;Enter the degree in celsius: &quot;; <br>cin &gt;&gt; c; <br>f = c * 1.8 + 32; <br>cout &lt;&lt; &quot;The degree in farenheit is &quot; &lt;&lt; f &lt;&lt; &quot;\n&quot;; <br>cin.get(); <br>return 0; <br>} <br>~ <br>~ <br>~ <br>
cstdlib <br>iostream
convention states your use of {} is either right after the function call or one line after. i.e. <br>main(){ <br>} <br>or <br>main() <br>{ <br>} <br> <br>this allows better reading of the code. <br>if you use cout as you have you should keep each part seperate from other parts. weird that didnt sound right but i.e <br>cout &lt;&lt; &quot;Welcome, this is a program to convert Celsius to Farenheit.&quot; <br>cout &lt;&lt; &quot;\n&quot; <br>cout &lt;&lt; &quot;Enter the degree in Celsius:&quot; <br>cin &gt;&gt; c <br> <br>again this is to keep the code clean and readable for the next coder. not that there would be a next coder however if you do it all the time you make it a habbit and it helps later on in a career. <br> <br>hope i helped

About This Instructable


22 favorites


More by jumper1111: How to make fake Windows error How to make a Origami Flying Bird How to make a Portable Photo Studio for Mobiles
Tags: c++ programs
Add instructable to: