OK. So I'm learning C++ on my own through online tutorials and online readings. There have been a few exercises that I've typed in and they should output a final number or a few numbers. This one exercise I just got sick and tired of trying to guess and check what is happening. Here's the code.
1. #include <iostream>
2. using namespace std;
3.
4. int main()
5. {
6. unsigned short shirts;
7. unsigned short pants;
8. unsigned short dresses;
9. unsigned short ties;
10.
11. cout << " -=- Georgetown Cleaning Services -=-\n";
12. cout << "Enter number of shirts: ";
13. cin >> shirts;
14.
15. cout << "Enter number of pants: ";
16. cin >> pants;
17.
18. cout << "Enter number of dresses: ";
19. cin >> dresses;
20.
21. cout << "Enter number of ties: ";
22. cin >> ties;
23.
24. cout << "\n====================================";
25. cout << "\n-=- Georgetown Cleaning Services -=-";
26. cout << "\n====================================";
27. cout << "\nCustomer Order"
28. << "\nItem Type Qty"
29. << "\nShirts: " << shirts
30. << "\nPants: " << pants
31. << "\nDresses: " << dresses
32. << "\nTies: " << ties
33. << "\n\n";
34.
35. return 0;
36. }
Why is it that from 24 - 32 is not being displayed for a continuous amount of time, until a press a button?
1. #include <iostream>
2. using namespace std;
3.
4. int main()
5. {
6. unsigned short shirts;
7. unsigned short pants;
8. unsigned short dresses;
9. unsigned short ties;
10.
11. cout << " -=- Georgetown Cleaning Services -=-\n";
12. cout << "Enter number of shirts: ";
13. cin >> shirts;
14.
15. cout << "Enter number of pants: ";
16. cin >> pants;
17.
18. cout << "Enter number of dresses: ";
19. cin >> dresses;
20.
21. cout << "Enter number of ties: ";
22. cin >> ties;
23.
24. cout << "\n====================================";
25. cout << "\n-=- Georgetown Cleaning Services -=-";
26. cout << "\n====================================";
27. cout << "\nCustomer Order"
28. << "\nItem Type Qty"
29. << "\nShirts: " << shirts
30. << "\nPants: " << pants
31. << "\nDresses: " << dresses
32. << "\nTies: " << ties
33. << "\n\n";
34.
35. return 0;
36. }
Why is it that from 24 - 32 is not being displayed for a continuous amount of time, until a press a button?