# Thread: compute cost of sending air parcel

1. ## compute cost of sending air parcel

write a program to compute the cost of sending an airmail parcel
from the UK to Australia. The maximum weight limit is 44 kgs. The user will enter a weight in kilos and the program computes and displays the fee. If the weight exceeds the maximum value the program warns the user and exits the program.

so far i have done this;
Code:
```#include<iostream>

using namespace std;

int main()
{
int kilos;
cout << "Type weight (kilos)" << endl;
cin >> kilos;

if (kilos > 44);
{
cout << "This value is out of range" << endl;
return 0;
}
else if (kilos == )
}```
However my issue is that it wants the program to display the cost as 70 when the user enters 12. Im getting confused on how that is done.

2. Presumably you either have a formula for the cost, or you have a table like 0-12 -> 70, 13-24 ->105, or whatever. In the first case, you type in the formula; in the second, you can use if statements to determine which class the weight is in.

3. would write a formula to calculate the cost. whatever is typed in, calculate the formula. if it's over 44kg then exit. Shouldn't be too difficult.