Write a program to print 7, 14, 21, 28, .... 70
Answers
Answered by
6
public class Range{
public static void main(String [] args) {
for (int i = 7; i < 71; i += 7) {
System.out.println(i);
}
}
}
for i in range(7, 71, 7):
print(i)
- We ran a for loop from 7 to 71 with 7 steps which printed the pattern.
- We used methods like print of python and Sopln of java to print the numbers returned by for loops
- And it is finished...
Hope it helps...
Similar questions
Math,
5 hours ago
Business Studies,
5 hours ago
English,
5 hours ago
Biology,
10 hours ago
Math,
8 months ago
Math,
8 months ago
Computer Science,
8 months ago