Advertisement
veronikaaa86

01. Numbers Ending in 7

Jan 30th, 2022
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. package forLoop;
  2.  
  3. public class P01NumbersEndingIn7 {
  4. public static void main(String[] args) {
  5.  
  6. for (int i = 1; i <= 1000; i++) {
  7. if (i % 10 == 7) {
  8. System.out.println(i);
  9. }
  10. }
  11. }
  12. }
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement