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
Which option allows to change date and time​
tester [92]
The Windows key has the Windows logo on it. Right-click the Date/Time display on the taskbar and then choose Adjust Date/Time from the shortcut menu. The Date and Time dialog box appears. Click the Change Date and Time button.
4 0
3 years ago
Read 2 more answers
When trying to remember a list of words, a person may choose a word to which they "hang" their memories on. This type of mnemoni
nika2105 [10]

Answer:

Peg

Explanation:

This is known as the "peg technique." The name comes from the fact that we usually employ pegs to hang clothes to dry. In this memory aid, the person who wants to memorize something creates mental associations between two concrete objects. This is done in a one-to-one fashion that links all the words together.

6 0
3 years ago
The _______ system coordinates computer resources, provides the user interface, and runs applications.
pychu [463]
Not sure but it could be operating system 

could be wrong though
5 0
3 years ago
Which form(s) of credit would be most appropriate for the receipt of a utility bill? (Select all that apply.) à. Charge card b.
Ludmilka [50]

Answer:

d. Service credit

Explanation:

8 0
2 years ago
Which terms represent the two types of client requirements?
Brums [2.3K]

Answer:

Client requirements. ... A statement of need, might then be prepared which is a first attempt to describe the possible requirements of the project. This may or may not result in the development of a new business project, and even if a project is necessary, it may not require a new building.

Explanation:

3 0
3 years ago
Other questions:
  • How can E-Commerce Portals ensure Security of online Transactions by Customers?
    10·1 answer
  • How to use translate on a website?
    15·1 answer
  • The purpose of a lockout tagout checklist is to​
    9·2 answers
  • PLEASE HELP!!!!
    7·1 answer
  • During the boot process, the computer performs a quick self diagnostic then loads the operating system into memory.... IS THIS T
    5·1 answer
  • Someone asks you for help with a computer that hangs at odd times. You turn it on and work for about 15 minutes, and then the co
    7·1 answer
  • You are a network engineer tasked with performing a site survey for a multiple-channel architecture (MCA) system in a three-stor
    11·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    13·1 answer
  • What is your impression on the subject fundamentals of database systems?​
    7·1 answer
  • Which term refers to the science that specifies the design and arrangement of items you use so you interact with the items effic
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!