Practice2_2629

# Practice2_2629 - German University in Cairo Faculty of...

This preview shows pages 1–2. Sign up to view the full content.

German University in Cairo Faculty of Media Engineering and Technology Prof. Dr. Slim Abdennadher Introduction to Computer Science , Winter Term 2009-2010 Practice Assignment 2 Discussion: 17.10.2009 - 22.10.2009 Exercise 2-1 Discount A discount is made on a purchase as follows: if purchase 1000 L.E., there is no discount if purchase > 1000 L.E., the discount is 5% Given the cost of the purchase, write an algorithm to calculate and print the money paid taking into consideration the 10% sales taxes. Exercise 2-2 Gas Station National Last Chance gas station sits on Cairo Alexandria route. There is no other gas station for 200 Miles. Write an algorithm to help drivers decide if they need gas or not. The user will enter: The capacity of the gas tank, in Gallons. The indication of the gas gauge in percent (full=100, three quarters=75 and so on). The miles per gallon of the car. The following is a sample run of the algorithm:

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

Practice2_2629 - German University in Cairo Faculty of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online