write a program in python to print all those numbers between 100 and 200 and divisible by 11.
Answers
Answered by
0
Explanation:
public class KboatNoZero
{
public void display() {
int count = 0;
for (int i = 100; i <= 200; i++) {
boolean isNoZero = true;
int t = i;
while (t > 0) {
if (t % 10 == 0) {
isNoZero = false;
break;
}
t /= 10;
}
if (isNoZero) {
System.out.print(i + " ");
count++;
}
//This will print 10 numbers per line
if (count == 10) {
System.out.println();
count = 0;
}
}
}
}
Similar questions
Social Sciences,
2 months ago
CBSE BOARD XII,
2 months ago
Math,
2 months ago
English,
3 months ago
Math,
3 months ago
Economy,
11 months ago
Math,
11 months ago
Math,
11 months ago