• + 0 comments

    My java solution :

    public class Solution {

    public static void multiplos(int N){
    int count = 1;
        while ((N*count)%N == 0 && count <= 10) {
            System.out.println(N+" x "+count+" = "+N*count);
            count ++;
        }
    }
    
    public static void main(String[] args) throws IOException {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
    
        int N = Integer.parseInt(bufferedReader.readLine().trim());
    
        bufferedReader.close();
    
        multiplos(N);
    
    }
    

    }