Now You Code In Class: Below Freezing Stats

Write a program to input a series of temperatures in Celcius, until 'quit' is entered.

As the temperatures are input, the program should keep track of the number of temperatures above freezing and below freezing.

As output the program should display number and percentage of temperatures above and below freezing.

Example Run:

Enter temp or type 'quit': 100
Enter temp or type 'quit': 0
Enter temp or type 'quit': -100
Enter temp or type 'quit': quit
Number at or below freezing 2 (66.67%)
Number above freezing 1(33.33%)

Step 1: Problem Analysis

Inputs:

Outputs:

Algorithm (Steps in Program):


In [1]:
# Step 2: Write code here