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
268226 Phạm Huỳnh Hưng Ministop HUTECH C/C++ Lỗi biên dịch (CE) 0 MS 0 KB 754 2023-11-18 19:59:10

Lỗi biên dịch:

Main.cc:1:7: error: expected nested-name-specifier before ‘System’
 using System;
       ^~~~~~
Main.cc:23:2: error: expected ‘;’ after class definition
 }
  ^
  ;
Main.cc: In static member function ‘static void Program::Main()’:
Main.cc:7:9: error: ‘Console’ was not declared in this scope
         Console.WriteLine("Nhập số quyển vô cần mua thêm (A):");
         ^~~~~~~
Main.cc:8:17: error: expected primary-expression before ‘int’
         int A = int.Parse(Console.ReadLine());
                 ^~~
Main.cc:11:17: error: expected primary-expression before ‘int’
         int B = int.Parse(Console.ReadLine());
                 ^~~
Main.cc:14:17: error: expected primary-expression before ‘int’
         int X = int.Parse(Console.ReadLine());
                 ^~~
Main.cc:17:17: error: expected primary-expression before ‘int’
         int Y = int.Parse(Console.ReadLine());
                 ^~~
Main.cc:21:112: error: invalid operands of types ‘const char*’ and ‘const char [9]’ to binary ‘operator+’
         Console.WriteLine("Số tiền ít nhất bạn cần mang theo để trả tiền là: " + totalPrice + " đồng");
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~