DWITE
October 2012
Problem 2
Candybar Graphs

Besides candy, you have also collected data on how many houses gave out candy on each street. Having this in a handy chart would significantly optimize your candy gathering next year!

The input file DATA2.txt will contain 5 lines, each a pair of non-negative integers, separated by a single space. The first is the number of houses that gave out candy on that street. The second is the number of houses that did not. There will be at least one house on each street.

The output file OUT2.txt will contain 5 ASCII percent bar graphs — the ratio of candy-giving houses. Each line will be 10 characters long, and percents will be rounded to the lowest 10th. E.g. 19% and 10% both round down to 10%. Use asteric * for candy part, followed by periods . for the candy-free houses.

Sample Input:
 
0 1
1 9
19 81
99 1
1 0
		        
Sample Output:
 
..........
*.........
*.........
*********.
**********