The output is not working in C++. The code is good.
#include <iostream> using namespace std; int main() { // your account's balance auto balance = 2452.4; // price for each notebook auto price = 259.99; // Task: calculate the number of notebooks you can afford and output it. // Hint: use an integer to store the result. int numberofbooksafford= balance/price; cout<<"Number of notebook you can afford :"<<numberofbooksafford<<endl; // Task: calculate the amount left over on your account after the purchase and output it on a new line. // Hint: calculate the total price of the purchase, then substract it from the balance. double totalPurchasePrice= numberofbooksafford* price; double amountLeftOver=balance-totalPurchasePrice; cout<< "Amount left over after the purchase"<<amountLeftOver<<endl; } I tried that output is still not working.