Write a program to print all the numbers below 50 which are divisible by 7.
Answers
Answered by
5
public class Divisible {
public static void main(String [] args) {]
for (int i = 0; i < 50; i += 7) {
System.out.println(i);
}
}
}
for i in range(0, 50, 7):
print(i)
- We used for loop with variable i.
- Range was from 0 to 50.
- And steps were 7.
- This is finished....
Hope this helps...
Answered by
0
Answer:
then simply print that number. Below is the implementation : C++; Java; Python3; C#; Javascript. C++ ...
Similar questions