Write a program that prompts a user for their age


Assignment

1. Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and associates that value with total. Thus your code should associate 1*1 + 2*2 + 3*3 +... + 49*49 + 50*50 with total. Use no variables other than k and total.

2. Same as question one, but only total squares that are even in your loop.

3. Same as question one, but only total squares that are odd.

4. Write a program that prompts a user for their age. Once received, check if it is odd or even. If even, output their year of birth. If odd, output the phrase "You are an odd one!"

The response should include a reference list. Double-space, using Times New Roman 12 pnt font, one-inch margins, and APA style of writing and citations.

Solution Preview :

Prepared by a verified Expert
Programming Languages: Write a program that prompts a user for their age
Reference No:- TGS02979535

Now Priced at $45 (50% Discount)

Recommended (93%)

Rated (4.5/5)