Question 4.15
unknown
c_cpp
2 years ago
428 B
6
Indexable
#include <iostream>
int main() {
double usrInput;
while (true) {
std::cout << "Enter sales in dollars (-1 to end): ";
std::cin >> usrInput;
if (usrInput == -1) {
break; // Exit the loop when -1 is entered
}
double salesRev = usrInput * 0.09;
double salary = 200 + salesRev;
std::cout << "Salary is: " << salary << std::endl;
}
return 0;
}
Editor is loading...