63 151
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #14315 in C++ for Marty

Question #14315
Write a program using this information: The Variety Store handles the following discount policy, if you take less than 10 items no discount, if you bring between 10 and 20 items you will be given a 10% discount, when you carry between 21 and 30 items with 20% off and if you carry more than 30 items is 30% off. Note this applies if the above quantities are purchased are items of the same type.
Expert's answer
#include <iostream>
using namespace std;

int main(){
int k = 0;
for (int i = 100 ; i < 200 ; i++){
& if (((i%5 == 0) || (i%6 == 0)) && !((i%5 == 0) && (i%6 == 0))) {
& k++;
&
& cout<<i<<' ';

& if (k == 10) {
& k = 0;
& cout<<endl;
& }
& }
}


system("pause");
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions