user
Task: Write an algorithm to print a multiplication table.

No input

Answer:
assistant
//Prints a multiplication table of size n 
void printMultiplicationTable(int n) 
{ 
    // loop to print n rows 
    for (int i = 1; i <= n; i++) 
    { 
        // loop to print n columns 
        // changing column value j  
        for (int j = 1; j <= n; j++) 
        { 
            // printing table values  
            // writing jth values of ith row            
            System.out.print(i*j + "   ");  
        } 
        // inceasing row value i 
        // for next row 
        System.out.println();  
    } 
}