I shouldn't do that, but as easy as it is, I found it funny to do... it remember me my first year of university, when we were asked stupid questions.

but you have to know, if you ask others to do your homework for you, you won't get far.

```
int calculate_fee(int cost) {
int result;
if (cost <= 5000)
throw new NotInterestingGetAnotherArchitectError();
// or simply 'return 8*cost/100;'
// 8% of the first 5000.00$ of the cost of a building
result = 8*5000/100;
// remainder
cost = cost - 5000;
// 3% on the remainder if the remainder is less than or equal to 80000.00
if (cost <= 80000) {
result = result + 3*cost/100;
else // or 2 1/2 % on the remainder if the remainder is more than 80000.00$.
result = result + 2.5*cost/100;
return result;
}
int main () {
...
calculate_fee(...)
...
}
```