problema
tengo q hacer un programa q me escriba la tabla de multiplicar de un numero y tengo esto:
#include <stdio.h>
main ()
{
int num,i,prod;
printf("Escriu el numero que vols multiplicar: n");
scanf("%d", &num);
for (i = 1; i <= 10; i++)
{
prod = num * i;
printf(""num" * "i" = "prod" n");
}
getchar();
getchar();
}
y me dice 14 E:Programacio Estructurada y ModularExemple2.16.cpp expected `)' before "num"
que le falta un parenteis y no se donde :s
#include <stdio.h>
main ()
{
int num,i,prod;
printf("Escriu el numero que vols multiplicar: n");
scanf("%d", &num);
for (i = 1; i <= 10; i++)
{
prod = num * i;
printf(""num" * "i" = "prod" n");
}
getchar();
getchar();
}
y me dice 14 E:Programacio Estructurada y ModularExemple2.16.cpp expected `)' before "num"
que le falta un parenteis y no se donde :s