Question 4.15

 avatar
unknown
c_cpp
a year ago
428 B
2
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;
}