Answer to Question #165080 in C++ for bush

Question #165080
Just post is a new courier service company which services all provinces in the South Africa. They charge their customers based on the weight of the parcel as indicated in the table below. However, if kilograms are above 50, the cost is charged according to the number of hours it took to deliver. Although the time is entered in minutes but they are charged R95.00 per hour. Clients may also add some extras to the delivery such as insurance which is charged 8.5% and priority is charged at 5% of the charge.
1
Expert's answer
2021-02-19T12:38:02-0500
#include<iostream>
using namespace std;
int main(){
float post,time, rate, total_price;
cout<<"\n Please enter the weight of the courier \n"<<endl;
cin>>post;
cout<<"\n The weight of the courier is: \n"<<post<<endl;
cout<<"\n Please enter the total time taken to deliver the courier: \n"<<endl;
cin>>time;
    if(post>50){
        rate=time*95;
        total_price=rate+rate*8.5/100 + rate*5/100;
        cout<<"\n The rate of the courier will be: \n"<<total_price<<endl;
    }else{
        cout<<"\n Rate of the courier will be: 80Rs. \n"<<endl;
        total_price=80+80*8.5/100 +80*5/100 ;
        cout<<"\n After including the insurance and priority, total charge \n"<<total_price<<endl;
    }
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 the first!

Leave a comment