In this simple program i cant return 2 integer values , can you help me ? How can i do ?
public class Aritmetica
{
public static int div(int x , int y)
{
int q = 0 ;
int r = x ;
while ( r >= y )
{
r = r - y ;
q = q + 1 ;
}
return r && q; **// Here i want to return x and y**
}
public static void main(String[ ] args)
{
if ( ( x <=0 ) & ( y > 0 ) )
throw new IllegalArgumentException ( " X & Y must be >0 " ) ;
int res4= div(x,y);
System.out.println( " q and r : "+ res4) ; **// and here i want to display q and r**
}
}