4.7 Code Practice: Question 2
Write a loop to print 56 to 70 inclusive (this means it should include both the 56 and 70). The output should all be written out on the same line.
Sample Run
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
Answers
Answered by
2
Answer:
public class xyz{
public static void main{
for(int i=56;i<=70;i++){
System.out.print(i);
}
}
}
HOPE IT HELPS :-)
Similar questions