Write a complete program that inputs 2 values from the console: first the price of an item (a real number), and second the discount (as an integer percentage). The program then outputs the final cost of the item. For example, if the price is 108.0 and the discount is 20, then the final cost is 86.4. However, if the discount is negative, your program should instead output "ERROR", and if the discount is 100 or larger, your program should instead output "FREE". Assume the input price is always valid.
Explanation / Answer
Try this code: #include using namespace std; int main() { double cost, discount; cout > cost; cout > discount; if(discount < 0) cout = 100) cout