0
Make an algorithm that calculates and writes a table of centigrade against degrees Farenheit, ranging from 50 to 150 of 1 in 1 I found the solution in C not in C++,
#include <iostream>
using namespace std;
int main()
{
for (float F = 50; F < 150; F++) {
float Ce;
Ce = (5 / 9) * (F - 32);
cout << "\nFarenheit " << F << "\nCentigrados " << Ce;
}
}
for (float F = 50; F > 150; F++)
, whyF > 150
?– Woss
It’s to make a sequence
– cristovanlopes
Exactly, but why did you put in
for
F > 150
? You know how thefor
and what is each parameter?– Woss
Repeat until F is greater than 150
– cristovanlopes
What do I know little
– cristovanlopes
The syntax of
for
should be read as "repeat while"– Woss
So the right one is F<150
– cristovanlopes
worked out that part, the problem now is the centigrados
– cristovanlopes
Farenheit 50 Centigrados 0 Farenheit 51 Centigrados 0 Farenheit 52 Centigrados 0
– cristovanlopes