While compiling simple cpp file I got an error. I want to write a function that changes celcius to farenheit.
double przelicznik(double n)
{
n = 1,8 * n + 32;
return n;
}
Also it doesn't give me a correct result.
While compiling simple cpp file I got an error. I want to write a function that changes celcius to farenheit.
double przelicznik(double n)
{
n = 1,8 * n + 32;
return n;
}
Also it doesn't give me a correct result.
The code is.
n = 1, (8 * n + 32)
The comma operator is a fairly uncommon mechanism where multiple expressions can be done in sequence.
correct code.
n = 1.8 * n + 32;