Problem exponentiate
User paaaaaaaaaaaaaaaaaaa
Submission Time 2024-11-29 22:53:18
Score 0
Max Time N/A
Max Memory N/A

Compile Error

exponentiate.cpp: In function ‘int main()’:
exponentiate.cpp:12:26: error: expected ‘;’ before ‘}’ token
12 | ans = a * ans
| ^
| ;
13 | }
| ~
exponentiate.cpp:14:14: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘int’)
14 | cout >> ans;
| ~~~~ ^~ ~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
exponentiate.cpp:14:14: note: candidate: ‘operator>>(int, int)’ <built-in>
14 | cout >> ans;
| ~~~~~^~~~~~
exponentiate.cpp:14:14: note: no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h: