Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int money;
- std::cout << "Enter the amount you Spent: " << std::endl;
- std::cin >> money;
- if(money > 300){
- std::cout << "You Spent more than 300$" << std::endl;
- std::cout << "You get 30% discount" << std::endl;
- }
- else if(money > 200 && money < 300){
- std::cout << "You Spent more than 200$" << std::endl;
- std::cout << "You get 20% discount" << std::endl;
- }
- else if(money > 100 && money < 200){
- std::cout << "You Spent more than 100$" << std::endl;
- std::cout << "You get 10% discount" << std::endl;
- }
- else if(money < 100 ){
- std::cout << "You Spent less than 100$" << std::endl;
- std::cout << "You get 5% discount" << std::endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement