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
What port does rdp use by default and from what range of numbers should you select a private port number?
VARVARA [1.3K]
The default RDP port is 3389 but can be configured in the range of <span>49152-65538</span>
5 0
3 years ago
Computer spreadsheet is a grid of​
Kruka [31]
Huh we’re, we’re is the computer screen shot
3 0
2 years ago
What is the purpose of flight simulator programs, and what are some of the benefits of using them?
saw5 [17]

Answer:

Flight simulators provide a cost-effective way for pilots to practice both routine and rarely-used skills. With simulator training, you can refine your skills in a variety of different flight scenarios that can be tailored to your specific goals.

Explanation:

hope this helps <3

6 0
2 years ago
Read 2 more answers
Match each word to its correct meaning.
MrMuchimi

Answer:

1. active listening             8. an online journal

2. barrier            1. a strategy for showing other people you are interested in what they are saying and that you understand what they are saying and how they feel about it

3. blog          2. anything that interferes with a message being sent or received

4. communication    5. guidelines for courteous electronic communication

5. netiquette         7. the person who creates or composes a message and delivers it either orally or in writing

6. receiver        9.. a personal belief that one should work hard and do a good job

7. sender             3. an online database of Web pages that can be created or edited by anyone (with permission)

8. wiki            6. the person who receives a message

9. work ethic          4. an exchange of information

Explanation:

The answer is as mentioned above. And these are important words from subject Professional Communication. And like when we talk of an exchange of information, we mean communication. And similarly, other words means as being mentioned above.  

5 0
3 years ago
Which of the following Web sites would be MOST credible?
Luba_88 [7]
I think that A could be the correct answer. The others are not as credible as A.
4 0
3 years ago
Read 2 more answers
Other questions:
  • When you park on a hill, think about which way _____.
    6·2 answers
  • Linda subscribes to a cloud service. The service provider hosts the cloud infrastructure and delivers computing resources over t
    10·1 answer
  • Brake fluid should be checked __________.
    8·2 answers
  • A jackhammer uses pressurized gas to transmit force to the hammer bit. What type of mechanical system is it?
    13·1 answer
  • A reflexive pronoun is a pronoun
    6·1 answer
  • Write a chemical reaction to show that nitric acid contains nitrogen​
    15·1 answer
  • 2. The<br>is the main and usually largest data storage hardware device in a computer​
    9·1 answer
  • What is meant by Information Retrieval?
    8·1 answer
  • Brainly not working for me not showing any ads or answers
    5·2 answers
  • Explain why a holiday on a cruise liner will be an ideal holiday​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!