JAVA PROGRAMMING

posted by .

"POWERS"

Compute the power of a number given the base and exponent. Do three versions of this
program using a while loop, a do-while loop and a for-loop.
Introduction

Please help..i don't know how to input this in java...please help.tnx

  • JAVA PROGRAMMING -

    import java.util.Scanner;

    public class BaseAndExponent {

    public static void main(String[] args)

    {
    int a;
    int b;
    Scanner scan = new Scanner(System.in);
    System.out.println("Base");
    }
    }

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Computer Science (MATLAB)

    I had a test in my computer science course in which I was asked if any while loop can be replaced with a for loop. I put true. I guess the answer was false. My professor said that if you had a while loop in which you asked the user …
  2. Computer Science (MATLAB)

    I had a test in my computer science course in which I was asked if any while loop can be replaced with a for loop. I put true. I guess the answer was false. My professor said that if you had a while loop in which you asked the user …
  3. PHYSICSI

    The rotating loop in an AC generator is a square 11.0 cm on a side. It is rotated at 60.0 Hz in a uniform field of 0.800 T. Calculate the following quantities as functions of time t, where t is in seconds. (a) the flux through the …
  4. Fundamental of computer science

    Pseudocode CountPositive integer totalPos,number Begin loop Input numbers If number>0 then totalPos<-totalPos +1 Loop while number<>0 Print totalPos Convert the above Pseudocode into a pascal program.
  5. programming

    Using Raptor, create a condition loop that will ask the user for input of two numbers. The numbers should be added and the sum displayed. The loop should also ask the user if he or she wishes to enter two more numbers and perform the …
  6. computers

    compute the unit price for products sold the program should input the name and price of an item and its weight in pounds and ounces. Then it should determine and display the unit price write a pseudo code program that will allow a …
  7. Physics

    A pilot, whose mass is 70.0 kg, makes a loop-the-loop in a fast jet. Assume that the jet maintains a constant speed of 325 m/s and that the radius of the loop-the-loop is 5.922 km. What is the apparent weight that the pilot feels (i.e., …
  8. College Physics

    A student of mass M = 82 kg takes a ride in a frictionless loop-the-loop at an amusement park. The radius of the loop-the-loop is R = 15 m. The force due to the seat on the student at the top of the loop-the-loop is FN = 696 N and …
  9. Physics

    A jet pilot (80 kg) flies a loop-de-loop at a constant speed of 600 m/s. a) What minimum radius can the loop have so that the centripetal acceleration is no more than 6ag?
  10. Physics

    A jet pilot (80 kg) flies a loop-de-loop at a constant speed of 600 m/s. a) What minimum radius can the loop have so that the centripetal acceleration is no more than 6ag?

More Similar Questions