menu
Qammunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
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);
Ask a Question
Questions
Unanswered
Tags
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 & Tech
high-school
Vincent Low
asked
by
Vincent Low
8.2k
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
8.7k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
May 4, 2022
15.0k
views
(a) 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);
Oleksii Masnyi
asked
May 4, 2022
by
Oleksii Masnyi
7.9k
points
Computers & Tech
high-school
1
answer
0
votes
15.0k
views
asked
Jun 27, 2024
215k
views
int[ ] values = {150, 34, 320, 2, 11, 100}; for (int i=0; i < ; i++) { if (values[i] % 10 == 0) System.out.println(values[i] + " is divisible by 10"); } which for-each loop would produce the same output?
SIM
asked
Jun 27, 2024
by
SIM
7.4k
points
Computers & Tech
high-school
1
answer
2
votes
215k
views
asked
Nov 19, 2021
56.4k
views
What is the best way to improve the following code fragment? if ((counter % 10) == 0) { System.out.println("Counter is divisible by ten: " + counter); counter++; } else { System.out.println("Counter is
Dlchet
asked
Nov 19, 2021
by
Dlchet
8.4k
points
Computers & Tech
high-school
1
answer
3
votes
56.4k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity.org