Question
im trying to get the program to run again if the user wants it to but it just asks the question, stores a response and
im trying to get the program to run again if the user wants it to but it just asks the question, stores a response and ends the program
#include
while (option!=1 && option!=2 && option !=3) // ask user to re-enter an option if they dont enter a 1, 2, or 3. { cout > option; } switch (option) { case 1: // output the 3 angles of a triangle and the triangle area if (a>0 && b>0 && c>0 && a> again; } else cout > again; break; case 3: // compute the circumcircle radius and the remaining interior area of the circumcircle cout > again; break; default: cout =include slostrean' //heoder contoining cout and cin aincluide a,b,cj cout &4 " Please enter the length of sides n,b, and c of the triangle: " \&c end1; cin 33 a b b 33<.1 double anglea cosangled angleb coshangleb anglec area spj dectare variabtes for aption cosinglea="(pon(b,2)+pon(c,2)pon(3,2))/(2bc)3" acos cosangle0="(pon(c,2)+pou(s,2)pon(b,2))/(24c+s);" j calculate semi-perimetar. sp="(1,e/2,e)+(ab+c))" a areo acea="sqet(sp(spa)(spb)(spc))s" largestinelirslefiadius interiorareat pi declare vartables aptiani y colculate the targest incincte radius lafgestincirclefadius="(2.e+area" z calculote remoining interior aneo of triangle. inteeleedeeat="area-" posichargestincirclekidius circuectircleaidius interiorareac deetare yartoblen optfon circuncincle nadius circuncirclehadius="(abc)/(" rart caleulate anea eutside triangle but inside cirele intertordreac="PI" pow areas int option="aj" i prospt user to chose which program rum cout s endll ee="ce" endik select progran you would like run: is endl es e end ib re find angles and area. largest incircle renaining ce cincuncincle rewaining circuncircle. c op optienf stone watee aptlon. char again . do is. imaisa entiy please enter or cinse option: udtch q aleplor side lengthes angien arne if ie. entprecinion eres trianglo it te aras embil. chn agalas terakj ondiy tin acoins tricak rin mother eption with sene sides trimgle r af w endil cin ss againz break defaule: entrys ester st onsty o agbln="+Yr)j" return>
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started