Kohl's Giftcard Program

Write your question here.

The store Kohls is offering giftcards accourding to the following purchase amount:

amt purchased card amount
less than 25 $5
25-49 $10
50-99 $25
100+ $30

Using this information, write a C++ program that accepts the amount of purchase a customer has purchased, determine the customer’s gift amount and display the gift amount.

1
2
3
4
5
6
7
8
9
  #include <iostream>

using namespace std; 

int main ()
{
return 0;
system ("pause");
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <iostream>

using namespace std;

int gift_card(int x) {
	if (x < 25) {
		return 5;
	}
	if (x >= 25 && x < 50) {
		return 10;
	}
	if (x >= 50 && x < 100) {
		return 25;
	}
	if (x >= 100) {
		return 30;
	}
}

int main() {
	int purchace_amount;
	cout << "Enter purchace amout: ";
	cin >> purchace_amount;

	cout << "\nYou have spent $" << purchace_amount << " dollars. You get a $" << gift_card(purchace_amount) << " gift card.\n\n";

	system("pause");
	return 0;
}
Totally thought this was spam.
Topic archived. No new replies allowed.