Question

java programming: Write a program that displays the following pattern (note you will need to use...

java programming: Write a program that displays the following pattern (note you will need to use the escape sequences we learned in class to do this)

&&&&&&
& &
& &
& &
& &
&&&&&&

0 0
Add a comment Improve this question Transcribed image text
Answer #1
public class AmpPattern {

    public static void main(String[] args) {
        System.out.println(
                "&&&&&&\n" +
                "&    &\n" +
                "&    &\n" +
                "&    &\n" +
                "&    &\n" +
                "&&&&&&");
    }
}
Add a comment
Know the answer?
Add Answer to:
java programming: Write a program that displays the following pattern (note you will need to use...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program that displays the following pattern: Write a program that displays the following table:...

    Write a program that displays the following pattern: Write a program that displays the following table: Assume a runner runs 14 kilometers in 45 minutes and 30 seconds. Write a program that displays the average speed in miles per hour. (Note that 1 mile is 1.6 kilometers) The U.S. Census Bureau projects population based on the following assumptions: One birth every 7 seconds One death every 13 seconds One new immigrant every 45 seconds Write a program to display the...

  • Write a program for the management of a bookstore in Java Programming Language, WITHOUT THE USE...

    Write a program for the management of a bookstore in Java Programming Language, WITHOUT THE USE OF STUFF RELATING TO OBJECTS AND WHAT NOT, just arrays, strings, loops, etc. I'm in an intro to programming class so I haven't learned those techniques and am not allowed to use them. The books we just create Overview; Opening menu 1. List all books 2. Search all books 3. Purchase books 4. Exit If option 1 is chosen: List all books by Title,...

  • C++ (i) Write a program that displays the following pattern: * *** ***** ******* ***** ***...

    C++ (i) Write a program that displays the following pattern: * *** ***** ******* ***** ***    * (ii) Katy bought 750 shares of stock at a price of $35.00 per share. She must pay her stockbroker a 2 percent commission for the transaction. Write a program that calculates and displays the following: The amount paid for the stock alone (without the commission) The amount of the commission) The total amount paid (stock plus commission) (iii) Write a program that...

  • write a java program that implements the following state diagram Write a Java program that implements...

    write a java program that implements the following state diagram Write a Java program that implements the following state diagram. Turn in a listing of your program, and the results of a test run with n = 97, You will need to know how to do input in Java. Use the following construct and include the given class in your progr int (new IntReader ) .readInt (O: import java.io.*; // a class to read in an integer public class IntReader...

  • Java Programming - Write a program that generates two random integers, both in the range 25...

    Java Programming - Write a program that generates two random integers, both in the range 25 to 75, inclusive. Use the Math class. Print both integers and then display the positive difference between the two integers, but use a selection. Do not use the absolute value method of the Math class.

  • Need help with java programming. Here is what I need to do: Write a Java program...

    Need help with java programming. Here is what I need to do: Write a Java program that could help test programs that use text files. Your program will copy an input file to standard output, but whenever it sees a “$integer”, will replace that variable by a corresponding value in a 2ndfile, which will be called the “variable value file”. The requirements for the assignment: 1.     The input and variable value file are both text files that will be specified in...

  • Write a function (NOT a complete program) that displays the following picture. Use nested for loops...

    Write a function (NOT a complete program) that displays the following picture. Use nested for loops inside of the program. ||#|@|#|(a) | # | @ # | @ #|(a) | # | @ You do not need to ask the user for input and can assume that there are only 6 columns

  • Following is my java program that i need help with. Write a program that uses a...

    Following is my java program that i need help with. Write a program that uses a JavaFX GUI that allows a user to enter a directory (folder) and then displays the number of the files in the directory. The number of files in the directory should be determined recursively.

  • write a java program that displays the following: Write a Java program that prompts the user...

    write a java program that displays the following: Write a Java program that prompts the user to enter an integer and determines whether 1. it is divisible by 5 and 6, whether on 2. it is divisible by 5 or 6, 3. it is divisible by 5 or 6, but not both. Here is a sample run of this program: Sample run: Enter an integer: 10 Is 10 divisible by 5 and 6? false Is 10 divisible by 5 or...

  • java programming: Convert the following PSEUDOCODE into a java program. For this problem I'm giving you...

    java programming: Convert the following PSEUDOCODE into a java program. For this problem I'm giving you the pseudocode and you are writing the program, in later problems you will write both the pseudocode and the java program. This means for this program pseudocode is NOT required. Pseudocode to convert to a java program: Create variables: speed, time and distance Store 20 in the variable speed Store 10 in the variable time Multiply speed * time and store the result in...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT