You can do both problems in the two-problem set depending on you number on the student list provided below. Those of you that are not on the list please pick any set you wish. You can collect up to 5 points for your final grade. These problems are not mandatory, but if you don’t do them, you risk your whole grade on the final. Please e-mail them to me at by 22 January. You have to do the problems individually. Please format your code orderly and provide comments.

For odd numbers on the student list

Write a program that finds the largest in a series of numbers entered by the user. The program must prompt the user to enter numbers one by one. When the user enters 0 or a negative number, the program must display the largest nonnegative number entered:

Enter a number: 60

Enter a number: 38.3

Enter a number: 4.89

Enter a number: 100.62

Enter a number: 75.2295

Enter a number: 0

The largest number entered was 100.62

Notice that the numbers aren’t necessarily integers.

In one state, single residents are subject to the following income tax:

Income Amount of tax

Not over $750 1% of income

$750–$2,250 $7.50 plus 2% of amount over $750

$2,250–$3,750 $37.50 plus 3% of amount over $2,250

$3,750–$5,250 $82.50 plus 4% of amount over $3,750

$5,250–$7,000 $142.50 plus 5% of amount over $5,250

Over $7,000 $230.00 plus 6% of amount over $7,000

Write a program that asks the user to enter the amount of taxable income, then displays the tax due.

The program should continue until the user enters a negative number.

For even numbers on the student list

Write a program that prompts the user to enter a number n, then prints all even squares between 1 and n. For example, if the user enters 100, the program should print the following:

4

16

36

64

100

Here’s a simplified version of the Beaufort scale, which is used to measure wind force:

Velocity (knots) Description

Less than 1 Calm

1–3 Light air

4–27 Breeze

28–47 Gale

48–63 Storm

Above 63 Hurricane

Write a program that asks the user to enter a wind velocity (in knots), then displays the corresponding description.

The program should continue until the user enters a negative number.

The student list

1 Vaidotas Ambrozaitis

2 Gintautas Andužis

3 Justinas Balinskas

4 Vytautas Barauskas

5 Šarūnas Didjurgis

6 Šarūnas Gružas

7 Andrius Gudiškis

8 Aleksandras Kamyšanskis

9 Rolandas Levinskas

10 Eduard Lukaševič

11 Vytautas Malinauskas

12 Audrius Martinkus

13 Andrius Narbuntas

14 Justas Pakštys

15 Audrius Prelgauskas

16 Evaldas Pumputis

17 Laimonas Rasalas

18 Rokas Samuolis

19 Andrius Triponas

20 Saulius Vasiliauskas

21 Linas Žičius