Computer the value of the given number

Assignment Help Basic Computer Science
Reference no: EM13234449

Prompt the user for a number and an exponent. Computer the value of the given number (the base) raised to the power of the exponent. (For example, the number two raised to the fourth power is 16.) Their suggested correct answer: Get base Get exponent Set i to 1 Set answer to 1 While (i <= exponent) Set answer = answer x base Add 1 to i End loop Print answer Ok my problem... Set answer = answer x base if answer is 1 then we get base as answer every time in this loop for all values of i, as long as, i is equal to or smaller than 1. This does not express an exponential situation or value as asked for in the prompt. What am I not understanding or getting here?

Reference no: EM13234449

Questions Cloud

Define the electron transport chain : In the electron transport chain, electrons from FADH2 are eventually used to reduce O2 into H2O. Experimentally, the proton motive force created by this process will generate 2 ATP molecules from ADP and Pi, using ATP synthase.
Which of the following is most correct : Bob has always performed well and has an excellent track record with the company. He and Arnold do not have any type of employment contract - they've just worked together for the last 30 years.
Explain how the new entrant acts first : Suppose that an industry cartel wishes to keep a new entrant out of an industry. Cartel members can conduct "predatory pricing", where the cartel lowers its price until the entrant leaves, after which it returns it price to the cartel's optimal (m..
Describe electrolysis continue to produce 0.50 g of copper : Electrolysis of a solution of CuSO4(aq) to give copper metal is carried using a current of 0.66 A. How long should electrolysis continue to produce 0.50 g of copper
Computer the value of the given number : Prompt the user for a number and an exponent. Computer the value of the given number (the base) raised to the power of the exponent.
Explain the same density and specific heat as water : If the solution has the same density and specific heat as water, what is ?H for this reaction (per mole of H2O produced)? Assume that the total volume is the sum of the individual volumes. Find kJ/mol of H20
Determine what is the equilibrium price and quantity : Research suggests that taxing pizza and soda would reduce the incidence of obesity in the U.S.A. Suppose you were required to choose between a price ceiling and a floor price to achieve the same result.
Describe the problem of genocide in the 20th century : Describe the problem of genocide in the 20th century. Include a description of the each of the three cases studies of genocide examined in lecture, their commonalities and contrasts, and how they each evidence some of the elements of 20th century glo..
Determine the density : Assume that there is a very beautiful ornate crown, supposedly made of solid gold, how would you determine its density

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Explain two standard apis supported by jaxp

Explain two standard APIs supported by JAXP (Java API for XML processing) and give a comprison between two mechanism.

  Write vhdl code to compile the greatest common divisor

Write VHDL code to compite greatest common divisor of two integers using Euclidean algorithm

  Write command to determine users on active directory from xp

Write down the command to determine all users on Active Directory from XP. Write down the query to look up a user on Active Directoy and see the user's property.

  Convert following base ten numbers their binary equivalent

Convert each of the following base ten numbers to their binary equivalent: a. 16.4 b. 39 c. 48.67

  Choose one schedule development tools

In this discussion, choose one of the schedule development tools introduced or another tool that you are already familiar with that was not identified in the studies. Identify the tool and complete the following.

  State whether each reference is hit or a miss

Assume a cache has 16 1-word blocks and is initially empty. Placement is by direct mapping. Also, state whether each reference is a hit or a miss.

  Driving force causing this evolution

Discuss the evolution of client-server computing from file server to multilayer applications to Web-based applications. What has been the driving force causing this evolution? Where do you think network computing will be in the next five years? Ten y..

  Utilized in enterprise network management systems

research and report on what RMON and RMON probes are and how they are utilized in enterprise network management systems and how they benefit.

  Determine the maximum number

Determine the maximum number Determine the range (maximum - minimum) Displays a histogram that shows the numbers in each five-unit range.

  Develop a web-based application to improve development

Develop a Web-based application to improve development and delivery of products and services. There are currently several incompatible systems related to the development and delivery of products and services to customers.

  Techniques attacker use to access information on system

Recognize all potential security threats on home personal computer. Recognize some of techniques the attacker might use to access some information on system.

  Write a java method which takes an integer

Write a Java method which takes an integer array parameter and locates the minimum value in the array and outputs that value using System.out.printf. Use an enhanced for loop to process the array. You only need one loop to do this!

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd