HomeSelenium

Selenium Interview Question 41 – Write a Java program which Prints numbers from 1 to 100. Print number and Divisible by 5 text if divisible?

Selenium Interview Question 41 – Write a Java program which Prints numbers from 1 to 100. Print number and Divisible by 5 text if divisible?

<<Previous Question       <<1500 Plus Interview Questions>>       Next Question>>

Write a Java program which Prints numbers from 1 to 100. Print number and Divisible by 5 text if divisible?

Watch the answer for this Selenium Interview Question in a detailed manner in the below youtube video:

Note: Don’t forget to subscribe to my Youtube channel here: Click here

Notes used for explanation in this Youtube video are provided after the video:

Notes used in the above Youtube Video:

for(int i=1;i<=100;i++){

 if(i%5==0){

    System.out.println(i+" Divisible by 5");

  }else {

    System.out.println(i);

  } 


}

Next Steps:

  • > For more Selenium Interview Questions and answers, continue to the next post (Click on Next Post link below)
  • > Check complete Selenium Interview Questions list here (Click here)

Please leave your questions/comments/feedback below.

Happy Learning ?

About Me > Arun Motoori

<<Previous Question       <<1500 Plus Interview Questions>>       Next Question>>

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

For FREE Testing Tutorials & Videos

X
Open chat
Contact Us on Whatsapp