45182023-03-29 12:11:43TortelliniJrSakktábla (75 pont)cpp17Compilation error
using namespace std;

int main() {
	std::int n, m, megoldas;
	std::cin >> n;
	std::cin >> m;
	if (n>m)
		n=m+1;
	if (m>n)
		m=n+1;
	megoldas=sqrt(m+n);
	std::cout << megoldas;
}
Compilation error
exit status 1
main.cpp: In function 'int main()':
main.cpp:4:14: error: expected unqualified-id before 'int'
    4 |         std::int n, m, megoldas;
      |              ^~~
main.cpp:5:14: error: 'cin' is not a member of 'std'
    5 |         std::cin >> n;
      |              ^~~
main.cpp:1:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
  +++ |+#include <iostream>
    1 | using namespace std;
main.cpp:5:21: error: 'n' was not declared in this scope
    5 |         std::cin >> n;
      |                     ^
main.cpp:6:14: error: 'cin' is not a member of 'std'
    6 |         std::cin >> m;
      |              ^~~
main.cpp:6:14: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
main.cpp:6:21: error: 'm' was not declared in this scope
    6 |         std::cin >> m;
      |                     ^
main.cpp:11:9: error: 'megoldas' was not declared in this scope
   11 |         megoldas=sqrt(m+n);
      |         ^~~~~~~~
main.cpp:11...