What is my mistake? (C++) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is my mistake? (C++)

int a = 20, b = 10; int tong = a + b; int hieu = a - b; int tich = a * b; int thuong = a / b; cout << tong << " " << hieu << " " << tich << " " << thuong << endl;

18th Jan 2024, 3:59 PM
Hà My Nguyễn
Hà My Nguyễn - avatar
3 Answers
+ 4
The code is missing fundamental C++ program structure. #include <iostream> using namespace std; int main() { //insert your code here return 0; }
18th Jan 2024, 4:50 PM
Brian
Brian - avatar
+ 3
The code works fine. Try to read the task description carefully again. Here will be also needed the description for a help.
18th Jan 2024, 4:33 PM
JaScript
JaScript - avatar
+ 3
tks everyone, i did it
19th Jan 2024, 6:17 AM
Hà My Nguyễn
Hà My Nguyễn - avatar