Mã chấm Tài khoản Bài tập Ngôn ngữ lập trình Trạng thái Thời gian Bộ nhớ Kích thước Thời gian nộp
13761 Lâm Quang Lộc Tính giá trị hàm f(x) C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 372 2022-12-29 20:02:21

Lỗi biên dịch:

Main.c: In function ‘main’:
Main.c:12:9: warning: missing terminating " character
   scanf("%d,&a);
         ^
Main.c:12:9: error: missing terminating " character
   scanf("%d,&a);
         ^~~~~~~~
Main.c:13:21: error: expected ‘)’ before ‘;’ token
   printf("Nhap b: ");
                     ^
Main.c:13:3: warning: passing argument 1 of ‘scanf’ makes pointer from integer without a cast [-Wint-conversion]
   printf("Nhap b: ");
   ^~~~~~
In file included from /usr/include/features.h:424:0,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from Main.c:1:
/usr/include/stdio.h:398:12: note: expected ‘const char * restrict’ but argument is of type ‘int’
 extern int __REDIRECT (scanf, (const char *__restrict __format, ...),
            ^
Main.c:22:1: warning: format not a string literal and no format arguments [-Wformat-security]
 }
 ^
Main.c:22:1: error: expected ‘;’ before ‘}’ token
Main.c:10:13: warning: unused variable ‘x’ [-Wunused-variable]
   int a,b,c,x;
             ^
Main.c:10:11: warning: unused variable ‘c’ [-Wunused-variable]
   int a,b,c,x;
           ^
Main.c:10:9: warning: unused variable ‘b’ [-Wunused-variable]
   int a,b,c,x;
         ^
Main.c:10:7: warning: unused variable ‘a’ [-Wunused-variable]
   int a,b,c,x;
       ^
Main.c:12:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d,&a);
   ^~~~~~~~~~~~~~~
   printf("Nhap b: ");
   ~~~~~~~~~~~~~~~~~~~~
   scanf("%d",&b);
   ~~~~~~~~~~~~~~~~
   printf("Nhap c: ");
   ~~~~~~~~~~~~~~~~~~~~
   scanf("%d",&c);
   ~~~~~~~~~~~~~~~~
   printf("Nhap x: ");
   ~~~~~~~~~~~~~~~~~~~~
   scanf("%d",&x);
   ~~~~~~~~~~~~~~~~
   int x=Tinh(a,b,c,x);
   ~~~~~~~~~~~~~~~~~~~~~
   printf("Gia tri f(x) la:%d");
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   return 0;
   ~~~~~~~~~~
 }
 ~