Connect with one of the following accounts


Please wait while we redirect...

Views: 1920   

Following program shows you how to calculate discount.
In this program we get bill amount and discount from user and shows after discount amount using following formula
Discount = bill - (bill * discount / 100)

#include <iostream>

int main() {
    int bill;
    int discount;

    std::cout << "Enter bill amount:";
    std::cin >> bill;

    std::cout << "Enter discount percentage:";
    std::cin >> discount;

    int afterDiscount = bill - (bill * discount / 100);

    std::cout << "After discount your bill is: " << afterDiscount;


Enter bill amount: 1500
Enter discount percentage: 15
After discount your bill is: 1275

On By

Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News