Results 1 to 10 of 10
- 01-18-2013, 02:49 PM #1
Member
- Join Date
- Jan 2013
- Posts
- 9
- 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.
- 01-18-2013, 03:06 PM #2
Re: [Java Eclipse] About this problem
Post your compilable code and the complete stack trace.
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 01-21-2013, 04:33 PM #3
Member
- Join Date
- Jan 2013
- Posts
- 9
- 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.
So in the console,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 re-multiplying the 2nd enter the number to make it as a exponent and the base will multiply depends how many on exponent. :-(
- 01-21-2013, 05:16 PM #4
Member
- Join Date
- Dec 2012
- Location
- Des Moines, IA
- Posts
- 33
- 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.
- 01-22-2013, 02:44 PM #5
Member
- Join Date
- Jan 2013
- Posts
- 9
- Rep Power
- 0
- 01-22-2013, 02:55 PM #6
Re: [Java Eclipse] About this problem
Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
The Ubiquitous Newbie Tips
- 01-22-2013, 04:23 PM #7
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
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,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 01-23-2013, 03:31 PM #8
Member
- Join Date
- Jan 2013
- Posts
- 9
- Rep Power
- 0
- 01-23-2013, 05:05 PM #9
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
- 01-23-2013, 05:35 PM #10
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Similar Threads
-
Problem with GUI in java applet using swing in eclipse
By er.raj in forum New To JavaReplies: 1Last Post: 03-26-2012, 03:53 PM -
eclipse java and max msp problem! HELP!!
By max&java in forum Advanced JavaReplies: 1Last Post: 11-28-2011, 01:56 AM -
JAVA, Eclipse problem in Win 7 64 bit ?
By makpandian in forum New To JavaReplies: 4Last Post: 10-10-2011, 07:02 AM -
java problem in eclipse.
By drasticthunder in forum Threads and SynchronizationReplies: 1Last Post: 07-08-2010, 07:56 AM -
problem from sun's java to eclipse
By doood123 in forum EclipseReplies: 0Last Post: 12-18-2007, 04:38 AM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks