【发布时间】:2022-11-23 03:02:27
【问题描述】:
【问题讨论】:
-
不要发布代码图像。
-
Please do not upload images of code/data/errors,图像难以阅读和排除故障。请edit你的帖子并在此处添加代码作为文本。一定要带上tour,阅读How to Ask。
标签: android
【问题讨论】:
标签: android
Your for loop will run for 10 times from 0-9.
then inside your for loop you inserted the color.
then your if condition states that when there is even place print white
else black.(i%2==0 means even)
【讨论】:
if (i%2==0)
{
print"Black"
} else {
print"White"
}
【讨论】: