//Escribir un programa que pida un número del 1 al 9 y escriba por pantalla la tabla de multiplicar corespondiente.

#include <stdio.h>
int main() {
    int num;
    do {
        printf("Introduce un numero entre 1 y 9: ");
        scanf("%d", &num);
    } while (num < 1 || num > 9);

    printf("\nTabla de multiplicar del %d:\n", num);
    for (int i = 1; i <= 10; i++) {
        printf("%d x %d = %d\n", num, i, num * i);
    }

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: