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
268093 Nhan Huỳnh Lâm Ministop HUTECH C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 233 2023-11-18 19:49:54

Lỗi biên dịch:

Main.cc: In function ‘int main()’:
Main.cc:7:9: error: redeclaration of ‘int a’
     int a, b, x, y;
         ^
Main.cc:6:9: note: ‘int a’ previously declared here
     int a, b, x, y;
         ^
Main.cc:7:12: error: redeclaration of ‘int b’
     int a, b, x, y;
            ^
Main.cc:6:12: note: ‘int b’ previously declared here
     int a, b, x, y;
            ^
Main.cc:7:15: error: redeclaration of ‘int x’
     int a, b, x, y;
               ^
Main.cc:6:15: note: ‘int x’ previously declared here
     int a, b, x, y;
               ^
Main.cc:7:18: error: redeclaration of ‘int y’
     int a, b, x, y;
                  ^
Main.cc:6:18: note: ‘int y’ previously declared here
     int a, b, x, y;
                  ^
Main.cc:8:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d%d%d", &a, &b, &x, &y);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~