We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Java
  3. Introduction
  4. Java Loops I
  5. Discussions

Java Loops I

Problem
Submissions
Leaderboard
Discussions
Editorial

Sort 1150 Discussions, By:

recency

Please Login in order to post a comment

  • adityasah7890
    16 hours ago+ 0 comments
        Scanner sc= new Scanner(System.in);
         int firstnum =sc.nextInt();
        for(int i=1; 0<firstnum&&i<=10;i++){
            System.out.println(firstnum+" x "+i+" = "+ firstnum*i);
    
    0|
    Permalink
  • yuvarajravi200
    4 days ago+ 0 comments

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

    -1|
    Permalink
  • manesh121992
    1 week ago+ 0 comments

    if(N<=20 && N >=2) { for (int i = 1; i <= 10; i++){ System.out.println(N+" x " + i +" = " + (N *i)); } }

    1|
    Permalink
  • vikasy2702
    2 weeks ago+ 0 comments

    import java.util.*; public class Table{ public static void main (String[] args) { int b=0; Scanner sc = new Scanner(System.in); System.out.println("enter the number"); int a = sc.nextInt(); System.out.println("enter the range"); int r = sc.nextInt(); for( int i=1;i<=r;i++){ b=a*i;

        System.out.println(a+" x " + i +" = " +b);
       // System.out.printf("%d * %d = %d \n" a,i,a*i);   this can aslo be used for printing our output 
    
    
      }
    }
    

    }

    0|
    Permalink
  • nieyuanhong
    2 weeks ago+ 0 comments
    int N = new Scanner(System.in).nextInt();
    for (int i = 1; i < 11; i++) 
        System.out.printf("%d x %d = %d%n", N, i, N*i);
    
    0|
    Permalink
Load more conversations

Need Help?


View editorial
View top submissions
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy