0

I write a code for table of any no. But it is not working. Please correct it.

#include <stdio.h> int main() { int a, b, c; printf ("enter the number:\n"); scanf("%d", &a); b=0; c = a*b; while(b<11) { printf("%d\n", &c); b = b+1; } return 0; }

20th Jul 2020, 5:21 PM
Ankit Agarwal
3 Answers
+ 1
in c=a*b,b isn't intialized with any value
20th Jul 2020, 5:22 PM
Abhay
Abhay - avatar
+ 1
Ankit Agarwal printf("%d\n", c); To print, just put c, not &c.. What actually trying to get here? Specify that clearly.. By that it prints c.(= 0), 11 times.
20th Jul 2020, 5:36 PM
Jayakrishna 🇼🇳
0
It's not working even after initializing
20th Jul 2020, 5:27 PM
Ankit Agarwal