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
269523 Bùi Thanh Long Ẩn Số PI C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 407 2023-11-18 21:37:07

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:8:5: error: ‘prinft’ was not declared in this scope
     prinft ( "Nhap so nguyen duong n: ");
     ^~~~~~
Main.cc:8:5: note: suggested alternative: ‘printf’
     prinft ( "Nhap so nguyen duong n: ");
     ^~~~~~
     printf
Main.cc:9:13: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
     scanf (n);
             ^
In file included from Main.cc:1:0:
/usr/include/stdio.h:383:12: note:   initializing argument 1 of ‘int scanf(const char*, ...)’
 extern int scanf (const char *__restrict __format, ...) __wur;
            ^~~~~
Main.cc:9:13: warning: format not a string literal and no format arguments [-Wformat-security]
     scanf (n);
             ^
Main.cc:9:11: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf (n);
     ~~~~~~^~~