01:198:111 Lecture 1: Computer Science Assignment 1
cyansea-lion159 and 56 others unlocked
47
01:198:111 Full Course Notes
Verified Note
47 documents
Document Summary
Multiplication: compute and display the result of how much a certain number of pounds of apple costs. If price < 0 or number of pounds < 0. Compute cost as price per pound * number of pounds. Gas: compute and display the price a person will pay for gas at the gas station. If the person pays with a credit card, there is an extra charge of 10% of the total price. Input: whether the person is using a credit card or not. Read if consumer has a credit card or not. If cost < 0 or price < 0. Total price = price per gallon of gas * number of gallons * 1. 1. Total price = price per gallon of gas * number of gallons. University tuition: compute the tuition a student pays at an university, given the following rules: Whether a student is a university employee or not. Whether a student is a state employee or not.