Wednesday
April 1, 2015

Homework Help: Computers (Java)

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

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:

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 ...
Java Programming - I'm new to Java and I'm not sure how to write the source code...
java programming - Create a java program that will calculate the current grade ...
JAVA PROGRAMMING - Create a java program that will calculate the current grade ...
Java - write a java program to read a record name, age, and salary. Calculate ...
java programming - write a java program using arrays function for hotel bill ...
java - Write a java application that finds the smallest of several integers. ...
Java - I am trying to write an algorithm for my JAVA class and am having some ...
Java - create a java program that accepts students names, and test scores from a...
java.please help - Write a Java program that prompts the user for a string. If ...

Members