using visual studio I'm getting an error and other platforms I am not. what am i missing ? |
PLEASE ALWAYS USE CODE TAGS (the <> formatting button), to the right of this box, when posting code. Along with the proper indenting it makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/ Hint: You can edit your post, highlight your code and press the <> formatting button. This will not automatically indent your code. That part is up to you. You can use the preview button at the bottom to see how it looks. I found the second link to be the most help. |
constexpr int BR{ 5 };
and see what happens.
|
|
Input Validation: Accept only positive numbers for the quarterly sales. |
Enter the quarterly sales for branch 1 Quarter 1: a Invalid entry! Must be a number. Quarter 1: -10 Invalid entry! Can not be a negative number. Quarter 1: 100 Quarter 2: 200 Quarter 3: 300 Quarter 4: 400 Enter the quarterly sales for branch 2 Quarter 1: 1000 Quarter 2: 2000 Quarter 3: 3000 Quarter 4: 4000 Quarter 1 Quarter 2 Quarter 3 Quarter 4 --------------------------------------------------------------- Branch 1 | 100 200 300 400 Branch 2 | 1,000 2,000 3,000 4,000 Total Sales for all branches is: $11,000.00 // <--- This was not part of your original program. |
Quarter 1 Quarter 2 Quarter 3 Quarter 4 --------------------------------------------------------------- Branch 1 | 100.00 200.00 200.00 200.00 Branch 2 | 1,000.00 1,100.00 1,100.00 1,100.00 Total Sales for all branches is: $5,000.00 |