/*
    NEXT WEEK HOMEWORK - WHILE LOOP ONLY (same program as for-loop version)
    -----------------------------------------------------------------------
    Program: Multiplication table
    Use ONLY a while loop. Ask the user for a number,
    then print that number x 1, x 2, ... x 10.
*/

#include <stdio.h>

int main(void) {
    int n;
    int i;

    printf("Enter a number: ");
    scanf("%d", &n);

    printf("\nTable of %d:\n", n);

    i = 1;
    while (i <= 10) {
        printf("%d x %d = %d\n", n, i, n * i);
        i++;
    }

    return 0;
}
