Tuesday
May 21, 2013

Homework Help: Computers (Java)

Posted by Ehren on Monday, December 1, 2008 at 10:08pm.

Hello -- Looking for help with an extra credit assignment to give my grade a needed boost. The program is to display a star pattern with java loops. From prof:

7. Write a program using loops to display the star pattern that follows the written description. You need to ask the user as to what the number of stars in each row should be (x)? You should also ask the user what number of rows to print (y)? When you get these two inputs start printing ‘x’ stars on each row. When you go to the next row the number of stars will shift right by one space. So the first row will have zero space, the second row will have 1 space, and so on. You will do that till you hit the mid-point. This would be y/2 or y/2+1 depending upon whether y is odd or even. After the mid-point start decreasing the number of spaces on each line as you reach y. Remember that you will have a nice arrow only if the number of rows is odd. Restrict the number of stars to less than 10 and more than 0.

*****
*****
*****
*****
*****
*****
*****
*****
*****

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

Computers (Java) - Hello -- Looking for help with an extra credit assignment to ...
Extra Credit Projects - I'm doing some extra credit projects for all of my ...
IT - Write a program that will give the interest rate for a new car loan based ...
IT - Write a program that will give the interest rate for a new car loan based ...
Java - create a java program that accepts students names, and test scores from a...
programming - 2-5 Grade Determination is says " Write a program that will ...
Language Arts Extra Credit - What is llatetpsh unscrambled. I seriously need ...
java - Write a java application that finds the smallest of several integers. ...
c++ - Write a program that asks the user to input a grade that he or she ...
Programming - Write a program that would calculate and display the results for ...

For Further Reading

Search
Members
Community