Results 1 to 2 of 2
Thread: Problem regarding multiplication
- 03-10-2010, 07:17 AM #1
Member
- Join Date
- Mar 2010
- Posts
- 1
- Rep Power
- 0
Problem regarding multiplication
its just a simple code. but am having trouble with itJava Code:public class Savings { public static void main(String [] args) { int p=1000,r=4;int a; int x=(int)Math.pow((1+r),10); //Output -- 9765625 a=p*(int)Math.pow((1+r),10); // Output -- 1175690408 System.out.println(x+"\n"+a); } }
9765625 *1000 == 9765625000 isnt it? then why is it showing such an output?
- 03-10-2010, 09:27 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,385
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
Multiplication Table
By SwEeTAcTioN in forum New To JavaReplies: 4Last Post: 02-24-2010, 04:11 AM -
Multiplication table quiz
By wolfy101 in forum New To JavaReplies: 1Last Post: 11-16-2009, 06:29 AM -
Multiplication table
By rjones215 in forum New To JavaReplies: 3Last Post: 10-19-2009, 04:34 PM -
Help with Multiplication
By phil028 in forum New To JavaReplies: 1Last Post: 12-06-2007, 07:39 PM -
Help with multiplication table
By Albert in forum New To JavaReplies: 1Last Post: 07-10-2007, 04:44 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks