Computer Science, asked by CosmicRazor, 21 hours ago

Write a program to print all the numbers below 50 which are divisible by 7.​

Answers

Answered by purveshKolhe
5

\huge{\green{\underbrace{\overbrace{\purple{\mathfrak{answer::}}}}}}

\sf{\underline{Java:}}

public class Divisible {

    public static void main(String [] args) {]

         for (int i = 0; i < 50; i += 7) {

              System.out.println(i);

         }

    }

}

\sf{\underline{Python:}}

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 vaibhavdantkale65
0

Answer:

then simply print that number. Below is the implementation : C++; Java; Python3; C#; Javascript. C++ ...

Similar questions