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
bonufazy [111]
3 years ago
14

I need help to find out what is wrong with this program and my variable, "exponent" comes out as 0 in the output instead of the

number i typed, "3".

Computers and Technology
1 answer:
sweet-ann [11.9K]3 years ago
3 0

You're substracting one from the variable "exponent" with every iteration of the loop, and you told it to break out of the loop once "exponent" is 0, therefore, it's always going to end up as 0 at the end.


If you want to keep the input from the user, then declare another variable like "counter" and assign the value of "exponent" to it and use it for the loop


Or even better, do this for the loop:

for(int i = 0; i < exponent; i++)

{

//Code here

}

You might be interested in
How do i set up a RAID 1 array?​
KiRa [710]

are you using windows? linux? mac?

3 0
3 years ago
Which process refers to starting up a computer
lisabon 2012 [21]
The process is called booting
4 0
3 years ago
Read 2 more answers
Re-write the below program correcting the bugs
motikmotik

Answer:

??????????????????????????

5 0
3 years ago
In a function header, you must furnish? the name of function all data type of the return value data type(s) of the parameters na
Alja [10]

In a function header, you must furnish the following:

  • The name of the function.
  • The data type of the return value.
  • The data type of the parameters.
  • The names of parameter variables.

<h3>What is a Function header?</h3>

A function header may be defined as a set of instructions that includes the name of the function that conveys to us what type of data it expects to respond to and the type of data it will return back to the calling function or program.

It will significantly mention all sorts of instructions like the compiler, the parameters, return value type, parameters of the variables, etc.

Therefore, the body of the functional header comprises all instructions that should be executed within a specific interval of time.

To learn more about the Function header, refer to the link:

brainly.com/question/12435434

#SPJ4

5 0
1 year ago
I WILL MAKE BRAINLIEST PLS HURRY
Oksanka [162]

Examples

<u>Lists: </u>

- Keep track of how much water you drink per day

- Hours spent on studying per week

- The growth of a plant

<u>Dictionaries:</u>

- Keep track of overall grades for each subject

- Keep track of where money is mostly spent on

- Dates for upcoming assessments and tests

Hope these examples help :)

5 0
2 years ago
Read 2 more answers
Other questions:
  • In java write a program:A contact list is a place where you can store a specific contact with other associated information such
    8·1 answer
  • How do you get free Wifi on your phone without paying
    6·1 answer
  • What is the statement describing? Agile team continuously adapt to new circumstances and enhance the methods of value delivery
    6·1 answer
  • The area of a rectangle is the rectangle's length times its width.
    5·1 answer
  • 10
    9·1 answer
  • Why would a programmer use a flow chart? (Edge2020 Coding Critical Thinking Questions)
    9·1 answer
  • 3. Radheshree has to complete her assignment and submit it on the next day. While typing
    9·1 answer
  • 3 ᴍᴜʟᴛɪᴘʟᴇ-ᴄʜᴏɪᴄᴇ Qᴜᴇꜱᴛɪᴏɴꜱ
    8·1 answer
  • What are the names of the components (each shown with a leader and a line) of a circuit shown in the diagram?
    7·1 answer
  • How is cell phone usage changing American Society? Is this a good change or a bad change? Explain.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!