Answer to Question #145308 in Java | JSP | JSF for Hamza saeed

Question #145308
What is the output of the following program?
public class Exercise9
{
public static void main(String[] args)
{
int myNum = 10;
int yourNum = 30;
if (yourNum % myNum == 3)
{
yourNum = 3;
myNum = 1;
}
else if (yourNum % myNum == 2)
{
yourNum = 2;
myNum = 2;
}
else
{
yourNum = 1;
myNum = 3;
}
System.out.println(myNum + " " + yourNum);
}
}
1
Expert's answer
2020-11-19T08:31:24-0500

3 1


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS