P
P
PRAIT2019-06-27 12:30:50
Java
PRAIT, 2019-06-27 12:30:50

How to write a program that will display characters that are multiples of two or even?

Hi everybody! I need your help! It is necessary to write a cyclic program that will display characters that are multiples of two or even using the outer and inner for.
Example:
If the counter variable of the inner loop is a multiple of 2 or even, we draw three ones using the print method not a multiple - we draw three plus signs.
I can not write, I will be glad to help. Write in the answers, I will mark as solved! Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2019-06-27
@PRAIT

characters that are multiples of two or even

BUT?
Ah, I understand.
Same.
Just in the loop, divide the iterator by 2 with a remainder and if the remainder is zero, then the number is even and what you need is displayed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question