i try to write the code somehow that if surge is No, then do not execute the ent
ID: 3798414 • Letter: I
Question
i try to write the code somehow that if surge is No, then do not execute the enter surge multiplier, but i dont know how. Please help.
compilation total)ki stdi n Xbase 2.ee, xminute 0.22, Xmile 1.15 s xminimum sbase 15.ee, Sminute -0.9e, smile 3.75, sminimum-25. Lbase 5.00, Lninute -0.5e, Lmile 2.75, Lminimum 10.55 totals, totalu, basefare, perminute, permile,total,sur Y, option name: "i Enter the minutes "i the miles "I Enter 'X for uberx or 's' for SUV or 'L' for luxury: "i Enter y if surge or 'N' if not Enter surge multiplier "i xoase (m xminute) (d Xmile)i (Xbase n) (m xminute) (d Xmile)is "X") Debug Find Results close D:CIB 22Alteat .exe 1 1. 83551597595215 MiB Time 83Explanation / Answer
Just put that part in an IF block.
-----------------------------------------------------------------------------------------
if(option == 'Y' || option == 'y')
{
cout<<"Enter Surge multiplier : ";
cin>>n;
}
-----------------------------------------------------------------------------------------
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.