+ 1

code doesn't work here

Hi there So i made a simple code but when i try it in sololearn it doesn't work. Anyone know why?

7th Dec 2017, 1:04 PM
Jordi
Jordi - avatar
3 Answers
+ 8
Show us the code.
7th Dec 2017, 1:10 PM
qwerty
qwerty - avatar
0
some words are dutch sorry for that #include <iostream> #include <string> using namespace std; int main() { long double straal; string answer; long double opp; long double pi; cout<<"Hello there enter your radius \n"; cin >> straal; cout <<"Good would you like pi 3.14 or pi 3.14159265 \n"; cout <<"Type yes for 3.14 or type no for 3.14159265 \n"; cin >> answer; if(answer == "yes"){ pi = 3.14; straal = straal*straal; opp = pi*straal; cout << "Your answer is "<<opp; } if(answer == "no"){ pi =3.14159265; straal = straal*straal; opp = pi*straal; cout <<"Your answer is "<<opp; } return 0; }
7th Dec 2017, 1:52 PM
Jordi
Jordi - avatar
7th Dec 2017, 2:35 PM
Ashwini B S
Ashwini B S - avatar