+ 1

Can someone fix this C code. Enter any number for its multiplication table.

#include <stdio.h> int main(){ int num; // Take the number as an input from the user; printf{"Enter a number\n"}; scanf("%d", &num); printf{"The multiplication table of %d is\n", num}; // for (int i = 0; i < 10; i++); // { // printf("%d x %d = %d\n",num, i=1, (i+1)*num); // } for (int i = 1; i <=10; i++) { printf("%d x %d = %d\n", num, i, i*num); } return 0; }

10th Nov 2021, 4:39 AM
Vinithkumar Alande
Vinithkumar Alande - avatar
1 Respuesta
+ 3
" printf " is a function. According to the C syntax, you should use parenthesis "()" instead of braces "{}" to call a function. https://code.sololearn.com/cjXsRLPS0T9e/?ref=app
10th Nov 2021, 4:45 AM
Arsenic
Arsenic - avatar