Answer to Question #250312 in C++ for ayvid

Question #250312

there are 3 member functions.1st one to set value for person discount,distance.second one to display personcount,distance and fair .3rd function to caliculate the fair with assumption that fair for 1 person is 300rupees if distance>=1200km and 200 rs for<500kmand for in between distance it is 350 rupees write c++pgm


1
Expert's answer
2021-10-12T13:49:57-0400
int discount(int price, int discount) {
  int result = price-(price*discount/100);
  return result;
}

int fair(int cntPeople) {
  return cntPeople*300;
}

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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS