/********************************************************************* * * Description: This program asks for the length of a phone call * and computes the cost. * * * Input: Integer representing the length of the call in minutes. * * Output: Cost of call. * * Written by: Jody DeRidder Date: 6/10/99 * *********************************************************************/ #include main() { int time; float cost; printf("Input your call time in minutes.\n"); scanf("%d", &time); printf("[%d]\n", time); /** Input echoed to screen **/ cost=(time*.44)+.29; /** Computes cost **/ if (time > 30) {cost==cost*.90;} /** Gives discount for over 30 minutes **/ printf("Your call costs $%.2f.\n", cost); }