Problem descsort
User Nathaniel
Submission Time 2025-03-10 18:01:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

descsort.cpp: In function ‘int main()’:
descsort.cpp:7:15: error: expected ‘;’ before ‘int’
7 | cin.tie(NULL)
| ^
| ;
8 |
9 | int n;
| ~~~
descsort.cpp:10:10: error: found ‘:’ in nested-name-specifier, expected ‘::’
10 | cin >> n:
| ^
| ::
descsort.cpp:10:9: error: ‘n’ has not been declared
10 | cin >> n:
| ^
descsort.cpp:14:7: error: ‘nums’ was not declared in this scope
14 | sort(nums.rbegin(),nums.rend());
| ^~~~
descsort.cpp:16:21: error: ‘n’ was not declared in this scope
16 | for (int i = 0; i <n; i++) {
| ^
descsort.cpp:17:11: error: ‘numbs’ was not declared in this scope
17 | cout << numbs[i] << " ";
| ^~~~~
descsort.cpp:20:10: error: expected ‘;’ before ‘}’ token
20 | return 0