
Patrick B. answered 04/06/21
Math and computer tutor/teacher
using namespace std;
#include <iostream>
int main()
{
float orderAmount=-1;
while (orderAmount<0)
{
cout << " Please input the order amount :>";
cin >> orderAmount;
}
float discountPercent = (orderAmount>=100) ? 0.10f : 0.00f;
orderAmount = orderAmount * (1-discountPercent);
cout << orderAmount << endl;
}