Question: 1. Write a code segment, using For loops, that prints a hollow rectangle of stars whose width and height are specified by two values read

1. Write a code segment, using For loops, that prints a hollow rectangle of stars whose width and height are specified by two values read from the keyboard. The top and bottom of the rectangle is a solid row of stars, each row between the top and bottom consists of a star, then width 2 spaces, and another star.

2. Write a nested For loop that outputs the hours and minutes in the period from 3:15 to 7:30.

3. Extend the loop in Exercise 12 to also output seconds.

4. How many lines do the loops in Exercises 12 and 13 output?

5.

Write assignment expression statements that do the following:

a. Add 7 to the variable days

b. Multiply the value in variable radius by 6.2831853

c. Subtract 40 from variable workHours

d. Divide variable average by variable count

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!