why is the result wont show?

Why this code wont work some functions:
1. Its just repeat with the same input value ('suhu' wont add with 10 as I wish on the second loop until the end)
2. my reamur value still stuck at 0 even tho i already entered reamur variable and its formula
3. It wont stop until 'suhu' reach 100.

anyone can help me pls? :( I'm such a noob in c++

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  #include<iostream>
#include<cmath>
using namespace std;
int main()
{
	double i, suhu, Reamur, Fahrenheit, Kelvin;
	cout<<"Inputkan nilai suhu dalam celcius=";cin>>suhu;

	for(suhu;suhu<=100;suhu+10)
	{
	Reamur=(0.2*suhu);
	Fahrenheit=(1.8*suhu+32;
	Kelvin=suhu+273;
		cout<<"suhu"<<suhu;
		cout<<"reamur"<<Reamur<<endl;
		cout<<"fahrenheit"<<Fahrenheit<<endl;
		cout<<"kelvin"<<Kelvin<<endl;}
		
		
	cout<<endl;


}
@heyitsme1998

You had a couple of small errors in your code. Line 9, your suhu loop, didn't add 10 in the loop. Line 12 was missing the closing parenthesis. Here's a working version of your program.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include<iostream>
#include<cmath>

using namespace std;
int main()
{
	double i, suhu, Reamur, Fahrenheit, Kelvin;
	cout<<"Inputkan nilai suhu dalam celcius=";cin>>suhu;

	for(suhu;suhu<=100;suhu+=10)
	{
		Reamur=(0.2*suhu);
		Fahrenheit=(1.8*suhu)+32;
		Kelvin=suhu+273;
		cout<<"suhu = "<<suhu<< endl;
		cout<<"reamur = "<<Reamur<<endl;
		cout<<"fahrenheit = "<<Fahrenheit<<endl;
		cout<<"kelvin = "<<Kelvin<<endl;
	}
	cout<<endl;
}
Thank you so muchhh :"))) HUG SCREEN!
Topic archived. No new replies allowed.