Saturday
August 2, 2014

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 ...
Java Programming - I'm new to Java and I'm not sure how to write the source code...
Java - create a java program that accepts students names, and test scores from a...
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 - simple java program to retrive data from oracle database between specific...
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 ...
computer - this isnt really a school question but i have a question about the ...
Java - Can anybody help me figure how to post a Java file to as an attachment. I...

Search
Members