Results 1 to 10 of 10
 01182013, 02:49 PM #1Member
 Join Date
 Jan 2013
 Posts
 22
 Rep Power
 0
[Java Eclipse] About this problem
Sample output :
Enter first number : 2
Enter second number : 3
Answer is : 8
// This is the process how we get the 8 = 2 * 2 * 2
I'm having a problem with this because I have no idea when using the loop. Everytime I try it always "Error" .
I'm so thankful if you will help me guys.
 01182013, 03:06 PM #2
Re: [Java Eclipse] About this problem
Post your compilable code and the complete stack trace.
Math problems? Call 1800[(10x)(13i)^2][sin(xy)/2.362x]
The Ubiquitous Newbie Tips
 01212013, 04:33 PM #3Member
 Join Date
 Jan 2013
 Posts
 22
 Rep Power
 0
Re: [Java Eclipse] About this problem
Im having a problem with the formula or how to derived it( base to exponent ). Le me give you an example like additions.
import java.util.Scanner;
public class Addition {
public static void main(String[] args) {
Scanner a = new Scanner (System.in) ;
System.out.print("Enter a number: ");
int number1 = a.nextInt();
System.out.print("Enter a number: ");
int number2 = a.nextInt();
int sum = (number1 + number2) ;
System.out.println("The sum of " + number1 + " and " +
number2 + " is " + sum);
}
}
I can type this
Console:
Enter a number: 2
Enter a number: 3
The sum of 2 and 3 is 5
Back to my problem , I;m having a hard time about the exponent thingy, someone says it need loop for remultiplying the 2nd enter the number to make it as a exponent and the base will multiply depends how many on exponent. :(
 01212013, 05:16 PM #4Member
 Join Date
 Dec 2012
 Location
 Des Moines, IA
 Posts
 35
 Rep Power
 0
Re: [Java Eclipse] About this problem
Here is link to the JAVA for statement tutorial. Give it a try and let us know if you have any questions. Also in the future you might want to learn how to use the code tags.
 01222013, 02:44 PM #5Member
 Join Date
 Jan 2013
 Posts
 22
 Rep Power
 0
 01222013, 02:55 PM #6
Re: [Java Eclipse] About this problem
Math problems? Call 1800[(10x)(13i)^2][sin(xy)/2.362x]
The Ubiquitous Newbie Tips
 01222013, 04:23 PM #7
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 13,529
 Blog Entries
 7
 Rep Power
 20
Re: [Java Eclipse] About this problem
Start with a number 1;
multiply by 2 (result is 2)
multiply by 2 again (result is 4)
multiply by 2 again (result is 8)
Note that you have multiplied by 2 three times ...
kind regards,
Joscenosillicaphobia: the fear for an empty beer glass
 01232013, 03:31 PM #8Member
 Join Date
 Jan 2013
 Posts
 22
 Rep Power
 0
 01232013, 05:05 PM #9
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 13,529
 Blog Entries
 7
 Rep Power
 20
 01232013, 05:35 PM #10Moderator
 Join Date
 Apr 2009
 Posts
 12,014
 Rep Power
 20
Similar Threads

Problem with GUI in java applet using swing in eclipse
By er.raj in forum New To JavaReplies: 1Last Post: 03262012, 03:53 PM 
eclipse java and max msp problem! HELP!!
By max&java in forum Advanced JavaReplies: 1Last Post: 11282011, 01:56 AM 
JAVA, Eclipse problem in Win 7 64 bit ?
By makpandian in forum New To JavaReplies: 4Last Post: 10102011, 07:02 AM 
java problem in eclipse.
By drasticthunder in forum Threads and SynchronizationReplies: 1Last Post: 07082010, 07:56 AM 
problem from sun's java to eclipse
By doood123 in forum EclipseReplies: 0Last Post: 12182007, 04:38 AM
Bookmarks