Results 1 to 3 of 3
- 04-17-2008, 02:19 PM #1
- 04-17-2008, 02:25 PM #2
You know what?!! if you don't try to do it yourself first, you will never realize how lovable java programming is....
An ideal forum was designed to help/discuss other members about there problem or new ideas, sharing it with them while learning....
And not to feed them ( Posting the complete code )....
don't be on a hurry,
sukatoa
- 04-17-2008, 03:08 PM #3
Hello Zebra,
I think your problem is not much hard...just think about the logic and do some paper work, it will help you lot.
First try it at your self...OK
however i have done this.
Java Code:public class FindQuotientsRemainders { public static void main(String[] args){ getNumber(); } public static void getNumber(){ int evenX = 11; int oddX = 14; for (int i=200;i<=225;i++ ){ int quoti = 0,rema = 0; if(i%2==0){ quoti = i/evenX; rema = i%evenX; System.out.println("When "+i+" is divided by "+evenX+", the quotients is "+quoti+" and remainders is "+rema); }else{ quoti = i/oddX; rema = i%oddX; System.out.println("When "+i+" is divided by "+oddX+", the quotients is "+quoti+" and remainders is "+rema); } } } }
sanjeev
Similar Threads
-
Question about loops
By BHCluster in forum New To JavaReplies: 4Last Post: 04-16-2008, 05:40 PM -
[SOLVED] Integers (averages and remainders)...need help
By Zebra in forum New To JavaReplies: 4Last Post: 04-16-2008, 01:26 PM -
[SOLVED] Need help with Loops...please!
By Zebra in forum New To JavaReplies: 5Last Post: 04-10-2008, 01:44 PM -
Loops (while do etc)
By manupr in forum New To JavaReplies: 1Last Post: 01-15-2008, 03:59 AM -
Help me: loops in java
By silvia in forum New To JavaReplies: 3Last Post: 07-19-2007, 06:47 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks