Borderou de evaluare (job #2038968)

Utilizator B_RazvanBaboiu Razvan B_Razvan Data 14 octombrie 2017 10:24:28
Problema Algoritmul lui Euclid extins Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:6:5: error: ‘int div’ redeclared as different kind of symbol int div; ^ In file included from /usr/include/c++/4.8/cstdlib:72:0, from /usr/include/c++/4.8/ext/string_conversions.h:41, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /usr/include/stdlib.h:785:14: error: previous declaration of ‘div_t div(int, int)’ extern div_t div (int __numer, int __denom) ^ user.cpp: In function ‘std::pair<long long int, long long int> euclidExtins(long long int, long long int)’: user.cpp:12:17: error: overloaded function with no contextual type information div = a; ^ user.cpp: In function ‘int main()’: user.cpp:29:14: error: invalid operands of types ‘long long int’ and ‘<unresolved overloaded function type>’ to binary ‘operator%’ if(c%div == 0) ^ user.cpp:30:46: error: invalid operands of types ‘long long int’ and ‘<unresolved overloaded function type>’ to binary ‘operator/’ printf("%lld %lld\n", p.first*(c/div), p.second*(c/div)); ^ user.cpp:30:64: error: invalid operands of types ‘long long int’ and ‘<unresolved overloaded function type>’ to binary ‘operator/’ printf("%lld %lld\n", p.first*(c/div), p.second*(c/div)); ^ user.cpp:21:38: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("euclid3.in", "r", stdin); ^ user.cpp:22:40: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("euclid3.out", "w", stdout); ^ user.cpp:24:22: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%lld", &T); ^ user.cpp:27:42: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%lld%lld%lld", &a, &b, &c); ^

Ceva nu functioneaza?