# Thread: Quotients/Remainders (Loops *Need Help*)

1. ## Quotients/Remainders (Loops *Need Help*)

Write a program that finds the quotients and remainders of all the numbers
between 200 and 225 when they are divided by x, where x= 11 if the number
is even and x is 14 if the number is odd. Here's what the output should
look like.

OUTPUT:

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

3. Hello Zebra,

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

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•