fork download
  1. #include <stdio.h>
  2. int main () {
  3. int num;
  4. printf("Digite um numero: ");
  5. scanf("%d", &num);
  6.  
  7. for(n= 1, n <= 10, n++) {
  8. tab = num * n
  9. print("\n %d", tab);
  10. }
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:7:6: error: ‘n’ undeclared (first use in this function)
  for(n= 1, n <= 10, n++) {
      ^
prog.c:7:6: note: each undeclared identifier is reported only once for each function it appears in
prog.c:7:10: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  for(n= 1, n <= 10, n++) {
          ^
prog.c:7:19: warning: left-hand operand of comma expression has no effect [-Wunused-value]
  for(n= 1, n <= 10, n++) {
                   ^
prog.c:7:24: error: expected ‘;’ before ‘)’ token
  for(n= 1, n <= 10, n++) {
                        ^
prog.c:7:24: error: expected expression before ‘)’ token
prog.c:8:3: error: ‘tab’ undeclared (first use in this function)
   tab =  num * n
   ^~~
prog.c:9:3: error: expected ‘;’ before ‘print’
   print("\n %d", tab);
   ^~~~~
stdout
Standard output is empty