Sort by

recency

|

1401 Discussions

|

  • + 0 comments

    import java.io.; import java.math.; import java.security.; import java.text.; import java.util.; import java.util.concurrent.; import java.util.regex.*;

    public class Solution { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

        int N = Integer.parseInt(bufferedReader.readLine().trim());
        for (int i=1; i<=10;i++){
            System.out.println(N+" x "+i+" = "+N*i);
        }
        bufferedReader.close();
    }
    

    }

  • + 0 comments

    public class Solution { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

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

    }

  • + 0 comments

    Hi Guys Solution for the Problem is Here:

        int N = Integer.parseInt(bufferedReader.readLine().trim());
    
        // Loop from 1 to 10 and print the multiples of N
        for (int i = 1; i <= 10; i++) {
            // Calculate the result of N * i
            int result = N * i;
    
            // Print the result in the required format
            System.out.println(N + " x " + i + " = " + result);
        }
    
        bufferedReader.close();
    }
    

    }

  • + 1 comment

    solution:

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

  • + 1 comment

    hello everyone, the code brings exact required output minus the spacing i even included the spaces in the code but still says am wrong.

    public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

        int N = Integer.parseInt(bufferedReader.readLine().trim());
        int i=1;
        do{
            System.out.println(N+""+"x"+""+i+""+"="+""+N*i);
            i++;
        } while(i<=10);
         bufferedReader.close();
    }