1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
AleksAgata [21]
3 years ago
8

(Display four patterns using loops) Ask the user to enter an integer to

Computers and Technology
1 answer:
fomenos3 years ago
4 0

Answer:

Hi There was small mistake. It is working fine for me. When you run from command line - use LoopPattern, not looppatern

import java.util.Scanner;

public class Looppattern {

  public static void main(String[] args) {

      Scanner sc = new Scanner(System.in);

      System.out.println("Enter how man levels you need: ");

      int levels = sc.nextInt();

      System.out.println("\n---------------Pattern A-----------------\n");

      for (int p = 1; p <= levels; p++) {

          for (int k = 1; k <= p; k++) { // increasing each level printing

              System.out.print(k);

          }

          System.out.println();

      }

      System.out.println("\n---------------Pattern B-----------------\n");

      int r = levels;

      for (int p = 1; p <= levels; p++) {

          for (int k = 1; k <= r; k++) {

              System.out.print(k);

          }

          r--; // decreasing levels

          System.out.println();

      }

      System.out.println("\n---------------Pattern C-----------------\n");

      for (int p = 1; p <= levels; p++) { // here incresing

          for (int k = p; k > 0; k--) { // and here decreasing pattern to

                                          // achieve our required pattern

              System.out.print(k);

          }

          System.out.println();

      }

      System.out.println("\n---------------Pattern D-----------------\n");

      r = levels;

      for (int p = 1; p <= levels; p++) {

          for (int k = 1; k <= r; k++) {

              System.out.print(k);

          }

          r--; // decreasing levels

          System.out.println();

      }

  }

}

Explanation:

You might be interested in
Complete the sentence
prisoha [69]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is: Online community technologies.

So, we can fill this question with the correct option as below:

<u>Online community technologies</u> are technologies that support virtual communities and the sharing of content with friends and family.

As we know that online community technologies are those technologies where people of the same group or interest make community virtually online. Where they can share their contents such as pictures, videos, thaught, ideas, etc with the group or family members.

There are different technologies that support virtual communities to share content with friends and family.

Such as Zoom meetings, Sk ype, Face book, Insta gram etc.

8 0
2 years ago
Read 2 more answers
Integrity constraints are enforced by Group of answer choices A. The operating system B. The end user C. The database designer D
slega [8]

Integrity constraints are enforced by The database designer.

<h3>What are Integrity constraints?</h3>

An  Integrity Constraints is known to be the protocols that a table's data columns is mandated to follow.

Note that they are used to hinder the types of information that can be put into a table and as such, Integrity constraints are enforced by The database designer.

Learn more about Integrity constraints from

brainly.com/question/28026113

#SPJ1

4 0
2 years ago
Which of the following is/are used in multimedia?
SCORPION-xisa [38]

Answer:

<em> </em><em>I </em><em>think</em><em> </em><em>text </em><em>and </em><em>pictures</em><em> </em><em>because</em><em> </em><em>I </em><em>know </em><em>it </em><em>is </em><em>in </em><em>my </em><em>book </em><em>I </em><em>hope</em><em> it</em><em> will</em><em> help</em><em> you</em><em> have</em><em> a</em><em> great</em><em> day</em><em> bye</em><em> and</em><em> Mark</em><em> brainlist</em><em> if</em><em> the</em><em> answer</em><em> is</em><em> correct</em><em> </em>

<em>kai6417</em>

<em>#</em><em>c</em><em>a</em><em>r</em><em>r</em><em>y</em><em> </em><em>on </em><em>learning</em>

5 0
2 years ago
As we move up a energy pyrimad the amount of a energy avaliable to each level of consumers
AleksandrR [38]

Explanation:

As it progresses high around an atmosphere, the amount of power through each tropic stage reduces. Little enough as 10% including its power is passed towards the next layer at every primary producers; the remainder is essentially wasted as heat by physiological activities.

8 0
3 years ago
Outline three difference each of a raster filled and vector file​
Alekssandra [29.7K]

Answer:

Unlike raster graphics, which are comprised of colored pixels arranged to display an image, vector graphics are made up of paths, each with a mathematical formula (vector) that tells the path how it is shaped and what color it is bordered with or filled by.

Explanation:

7 0
3 years ago
Other questions:
  • PLS HELP ASAP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    15·1 answer
  • A(n) ____________________ is a set of programs that coordinates all the activities among computer or mobile device hardware.
    10·1 answer
  • Research information technology affects on job market, career pathways, occupational outlooks in business and finance and synthe
    7·1 answer
  • Besides the Computer Inventory and Maintenance form, what other documentation should you keep on each computer? How might you st
    8·1 answer
  • A character with the point size of 10 is about 10/72 of once inch in height
    8·1 answer
  • __________ is a growing practice in cooperative farmingassociations to pool and sell the fruit as a common commodity underthe br
    6·1 answer
  • Self-confidence, blank, and communication are key factors to building positive relationships. Fill in the blank with a 13 letter
    5·1 answer
  • Problem 1: you must write a method for this problem called sentenceAnalyzer Write a program that reads a sentence from the keybo
    10·1 answer
  • Assume the user responds with a 3 for the first number and a 4 for the second number.
    13·1 answer
  • What is the output for the following program?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!