Problem area_noi
User JAYLIU
Submission Time 2024-02-19 10:45:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

area_noi.cpp:4:11: error: redefinition of ‘int n’
4 | int n, h, n, i, size, largest;
| ^
area_noi.cpp:4:5: note: ‘int n’ previously declared here
4 | int n, h, n, i, size, largest;
| ^
area_noi.cpp: In function ‘int main()’:
area_noi.cpp:9:14: error: ‘w’ was not declared in this scope
9 | cin >> h >> w;
| ^
area_noi.cpp:11:24: error: expected ‘;’ before ‘)’ token
11 | for (i = 1; i < n, i++)
| ^
| ;
area_noi.cpp:14:3: error: reference to ‘size’ is ambiguous
14 | size = h * w;
| ^~~~
In file included from /usr/include/c++/9/string:54,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/ostream:38,