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
mojhsa [17]
4 years ago
10

Write the definition of a method named printPowerOfTwoStars that receives a non-negative integer n and prints a string consistin

g of "2 to the n" asterisks. So, if the method received 4 it would print 2 to the 4 asterisks, that is, 16 asterisks: ����**************** and if it received 0 it would print 2 to the 0 (i.e. 1) asterisks:
Computers and Technology
1 answer:
defon4 years ago
8 0

Answer:

import java.io.*;

import java.util.*;

import java.lang.Math;

class GFG {

   public static void PowerOfTwoStars(int n){

       double a=Math.pow(2,n); //calculating the power..

       for (int i=1;i<=a;i++)//looping to print the stars.

       {

           System.out.print("*");

       }

   }

public static void main (String[] args) {

    Scanner star=new Scanner(System.in);//creating the scanner class object.

    int n=star.nextInt();//taking input.

    PowerOfTwoStars(n);//calling the function.

}

}

Input:-

3

Output:-

********

Explanation:

In the method PowerOfTwoStars which contains one argument I have calculated the power that is 2 to the n.Then looping form 1 to power and printing the stars and for better explanation please refer the comments the code.

You might be interested in
Question 11 of 20
horrorfan [7]

The type of tool would best serve a project manager whose team needs to share many different types of documents are d. timelines.

<h3>What are the timelines?</h3>

A mission timeline outlines the mission activities so as in their occurrence. It captures precisely what wishes to be finished over the path of the mission lifecycle and the way it will likely be finished.

The mission control timeline is an in-depth agenda on your mission. It spells out all the duties concerned and a closing date for every in order that your complete group can see whilst man or woman steps will take area and whilst the entire mission could be wrapped up.

Read more bout the project manager:

brainly.com/question/6500846

#SPJ1

8 0
2 years ago
What is the relationship between data, information, business intelligence, and knowledge?
Tpy6a [65]

Answer:

The answer is below

Explanation:

Given the following:

Data is oftentimes described as actual truth or evidence about a situation or condition.

Information, on the other hand, is described as a refined data

Business Intelligence is defined as a combination of several information utilized in the decision-making process.

Knowledge is basically described as a form of intellectual properties, which encompasses a lot of experiences, skills, and creativity.

Therefore, the main relationship between all these is the utilization of these resources to enhance and improve the decision-making process. This is because, the gathered DATA is converted to INFORMATION, which in turn used to build BUSINESS INTELLIGENCE and finally, through the combination of past experiences, skills and talent, leads to a wealth of KNOWLEDGE to enhance and improve the decision-making process.

7 0
3 years ago
Running fewer applications at once is a way to resolve which type of bottleneck?
vichka [17]
The answer is <span>memory.  </span>Running fewer applications at once is a way to resolve the bottleneck in <span>memory.  </span>Run fewer programs at the same time and restarting a PC regularly, is a good way to clear out its memory.
6 0
3 years ago
How do you get Brainliest on a question?
Mama L [17]

Answer:

yes that is the way things work and I think for the answer to be marked brainiest there must be two answers that were posted.

Explanation:

Hope this helps:)

5 0
3 years ago
Read 2 more answers
The most common approach for making individual analysis is to:
stiks02 [169]

Answer:

A)predict future organizational needs.

Explanation:

It is important to perform a SWOT analysis. Which helps us predict future business needs. Highlighting strengths, weaknesses, opportunities and threats.

  1. analyzing its internal characteristics (Weaknesses and Strengths).
  2. external situation (Threats and Opportunities) in a square matrix.
8 0
3 years ago
Other questions:
  • A ____ paragraph places the first character of a text line near the left border of a placeholder.
    14·1 answer
  • . What is a "secondary dimension" in Google Analytics?
    9·1 answer
  • What was the Messana conflict
    7·1 answer
  • Organizational sites with .org domains are usually managed by what type of organization
    7·1 answer
  • What is the purpose of a report?
    14·1 answer
  • A. Choose the correct answer.
    8·2 answers
  • By default, Outlook displays messages in the Content pane grouped by the
    13·1 answer
  • What are different sheet icons
    5·1 answer
  • What is the full form of MPEG?<br> The full form for MPEG is ________.
    9·1 answer
  • Weak passwords are a(n) ___________ threat
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!