Java 30 Days of Code - Day 5 - Loops

In previous articles we learnt about Instance variables, constructors. In this article we will learn about Loops and its implementation in Java. We will solve 1 HackerRank problem statement to understand more.

Java 30 Days of Code - Day 5 - Loops

Problem statement - Print out the multiplication table for any input number upto 10 integers.

Solution -

for(int i = 1; i<=10; i++){
            
            System.out.println(n + " x " + i + " = " + n*i) ;
        }


Explanation -
  • Simplest loop program, we are printing out the multiplication table of 2 upto 10.    

Comments

Popular posts from this blog

Azure Tutorials Series - Azure Networking

Coforge Interview Questions | Automation Testing profile

Testing in CI/CD