67362023-12-18 12:36:33szabelrOszthatóság 31-gyelcpp17Forditási hiba
using namespace std;

int main()
{
    int n,x;
    cin>>n;
    if(n%31==0)
        cout<<"IGEN"<<endl;
    else cout<<"NEM"<<endl;
    while(n>0)
    {
        x=n%10;
        if(n/10-(3*x)>=0)
            cout<<n/10-(3*x)<<" ";
        n=n/10-(3*x);
    }
    return 0;
}
Forditási hiba
exit status 1
main.cpp: In function 'int main()':
main.cpp:6:5: error: 'cin' was not declared in this scope
    6 |     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:8:9: error: 'cout' was not declared in this scope
    8 |         cout<<"IGEN"<<endl;
      |         ^~~~
main.cpp:8:9: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
main.cpp:8:23: error: 'endl' was not declared in this scope
    8 |         cout<<"IGEN"<<endl;
      |                       ^~~~
main.cpp:1:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
  +++ |+#include <ostream>
    1 | using namespace std;
main.cpp:9:10: error: 'cout' was not declared in this scope
    9 |     else cout<<"NEM"<<endl;
      |          ^~~~
main.cpp:9:10: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#includ...