/* Example 3.1: Exchange kiosk Course: IS 0015 Author: Peter Brusilovsky This program calculates the amount of dollars received in an exchange kiosk for the given amount in German marks */ #include main() { float dollars_for_mark; /* exchange rate */ int comission; /* comission in dollars */ float marks; /* marks given */ float dollars; /* dollars returned */ /* get data */ dollars_for_mark = 0.666; comission = 3; marks = 100; /* calculate USD */ dollars = marks * dollars_for_mark - comission; /* print results */ printf("For %6.2f marks you will get %6.2f dollars!\n" , marks, dollars); }