menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Register
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
Rewrite the following using if else statement: int x; String s=(x%3=0)? “Divisible by 3" : "Not divisible by 3"; System.out.println(s);
asked
Sep 19, 2022
219k
views
0
votes
Rewrite the following using if else statement:
int x;
String s=(x%3=0)? “Divisible by 3" : "Not divisible by 3";
System.out.println(s);
Computers and Technology
high-school
Vincent Low
asked
by
Vincent Low
5.7k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
1
vote
int x;
String s = “x%3=0?”
if( x%3 == 0){
s = “Divisible by 3”
}
else{
s = “Not divisible by 3”
}
System.out.println(s)
Joseph Wood
answered
Sep 23, 2022
by
Joseph Wood
6.4k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
6.5m
questions
8.7m
answers
Other Questions
10 points Wireframing and storyboarding are helpful in which step of web development? Advertising Planning Printing Publishing
What is Blender's default save directory for movie AVI files?
If a website ends with .gov does it mean that its written by the government or?
To group option buttons so that selecting one deselects all of the others, you must make the ____ attribute the same.
How do I turn on your asus chromebook flip?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org