#include <iostream>
usingnamespace std;
int main()
{
float x1;
cout << "please enter first line length : " << endl;
cin >> x1;
float y1;
cout << "please enter second line length : " << endl;
cin >> y1
;float z1;
cout << "please enter second line length : " << endl;
cin >> z1
;float rad = (.5)*(x1+y1+z1);
cout << rad << endl;
if((x1>0)){int x2 = rad-x1;};
cout << "x" << x2 << endl;
/* I want to make another variable like this one in python
x1=int(input("first line length :"))
if x1>0:
x2=rad-x1 (rad is defined in python)
else:
print("please enter positive number for the firs line length")
however it says that x2 was not declared */
;return 0;
}
It's the prompt that is automatically put in the box you type your question into when you create a new topic. Some people don't delete the text that's already there.