# Computers (Java)

posted by .

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.

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

## Similar Questions

1. ### Computers (Java)

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 …
2. ### Programming

Write a pseudocode program that asks the user for an integer between 1 and 12. The program is to calculate the times table for that number. So for example, if the user enters a 2, then the program has to calculate 2x1 and display the …
3. ### programming

2-5 Grade Determination is says " Write a program that will input three test scores. the program should determine and display their average. the program should then display the appropriate letter grade based on there average. the letter …
4. ### Java Programming

I'm new to Java and I'm not sure how to write the source code for this problem I got in class... Write a java program using the while and if statement that will accept ten student grades and that will display the sum of the grades, …
5. ### java programming

write a java program using arrays function for hotel bill calculation?
6. ### Java

write a java program to read a record name, age, and salary. Calculate the tax amount on the salary field display the new record.
7. ### JAVA PROGRAMMING

Create a java program that will calculate the current grade in a classroom. The program should ask for 5 grades as well as total point value per grade available.
8. ### java programming

Create a java program that will calculate the current grade in a classroom. The program should ask for 5 grades as well as total point value per grade available.
9. ### java program

write aprogram that can display the payrol system
10. ### computer, science, java, software

Write a Java program to declare and store numbers from 1 to 10 in a single dimensional array and display the output in the following format. 1 2 3 4 5 6 7 8 9 10

More Similar Questions