Mapping loops To number

PHOTO EMBED

Wed Apr 19 2023 11:53:53 GMT+0000 (Coordinated Universal Time)

Saved by @Mohamedshariif #java

//output
4  7  10  13  16

for (int count = 1; count <=5; count++) 
      {
         System.out.print(3 * count + 1 + " ");
      }

//output
2 7 12 17 22 

 for (int count = 1; count <=5; count++) 
      {
              System.out.print(5 * count -3 + " ");
      }
// same output
int num = 2;
      for (int count = 1; count <=5; count++) 
      {
          System.out.print(num +" ");
          num = num + 5;
      }

// outpu
17  13 9 5 1

for (int count = 1; count <=5; count++) 
      {
          System.out.print(-4 * count + 21 +" ");
      }
content_copyCOPY