Converting Celsius and Fahrenheit in C++ I've made my first little program written in C++ and was wondering if anyone could evaluate it and suggest some improvements. No copy paste. I was wondering if I can do something with my little knowledge and came up with the simple idea of converting Celsius and Fahrenheit.

I don't know why, but when using 9/5, it gives a different output than when using 1.8 or 9.0/5.0.

#include &lt;iostream&gt;
using namespace std;

// My very first code written by myself

  char temperature; // what are we converting ( celsius or farenheit into another )
  float value; // value that is being converted ( -10, 0, 10, 20.5 etc. )

int main()
{
    cout &lt;&lt; "Welcome" &lt;&lt; "\n" &lt;&lt; "This little program converts Celsius to Fahrenheit and vice versa" &lt;&lt; endl;
    cout &lt;&lt; "Enter c for Celsius, f for Fahrenheit or p for proof" &lt;&lt; endl;
    cin &gt;&gt; temperature; // storing input which accepts only c, f, p
    switch (temperature) { // checking input for one of 3 accepted options, else using default
        case 'c' : {
            cout &lt;&lt; "Converting Celsius to Fahrenheit" &lt;&lt; "\n" &lt;&lt; "Enter value" &lt;&lt; endl;
            cin &gt;&gt; value; // storing the value of temperature
            float farenheit = value*1.8+32; // converting celsius to fahrenheit using the formula
            cout &lt;&lt; value &lt;&lt; " Celsius in Fahrenheit is: " &lt;&lt; farenheit &lt;&lt; endl;
        }
            break;
        case 'f' : {
            cout &lt;&lt; "Converting Fahrenheit to Celsius" &lt;&lt; "\n" &lt;&lt; "Enter value" &lt;&lt; endl;
            cin &gt;&gt; value; // storing the value of temperature
            float celsius = (value-32)/1.8; // converting fahrenheit to celsius using the formula
            cout &lt;&lt; value &lt;&lt; " Fahrenheit in Celsius is: " &lt;&lt; celsius &lt;&lt; endl;
        }
            break;
        case 'p' : {
            cout &lt;&lt; "Proof that program is running correctly, here is a list of -20 to 20 Celsius converted to Fahrenheit" &lt;&lt; endl;
            for (int i=-20; i&lt;21; i++) { // using a for loop to print Celsius to Fahrenheit values from -20 to 20
                cout &lt;&lt; i &lt;&lt; " = " &lt;&lt; i*1.8+32 &lt;&lt; endl; // output Celsius = Fahrenheit
            }
        }
            break;
        default:
            cout &lt;&lt; "Invalid input! Use c, f or p" &lt;&lt; endl; // any input except the 3 accepted options will result in this default output
    }
    cout &lt;&lt; "Made by blackborg";
    return 0;
}
You might as well break the habit of using using namespace std. It involves a little more additional code, but it'll be helpful in the future, especially when using header files.
You don't need those global variables outside of main(). You should really avoid global variables unless absolutely necessary since they can be changed from any scope and you may not even know it. Just put those two variables inside if main() before their use.
farenheit is spelled incorrectly; it should be fahrenheit.
What if the user uses an uppercase 'C' or 'F' instead? You should account for those as well:

case 'c':
     'C': {




case 'f':
     'F': {

It may be more readable to multiply by both 9.0/5.0 and 5.0/9.0 respectively instead of 1.8 since that's most common with these conversion formulas. Make sure not to use integers for this, otherwise the division will truncate towards 0 (in this case, you'll end up with 1 instead of 1.8 and 0 instead of 0.555556).
You may find it better to use double instead of float in most cases and because the former has more precision.
For the next step up, I would recommend adding additional functions since main() shouldn't have to do all of the work.

You can simply acquire value from main(), pass it to the applicable function, then return the result and display it. It'll also allow you to avoid duplicating code in the switch, such as having multiple inputs for value, which is very nice and will be essential in every other program you create. I'll let you come up with that yourself.
If you want to make your program more useful, you can also add Kelvins.
You should probably put that tagline cout in a comment instead, otherwise it may be annoying to see it come up each time when only a result is expected to be printed.
You don't really need return 0 at the end of main() since success is already guaranteed at that point, though it won't hurt anything either.