| 14214 | 2025-01-10 09:40:06 | kongopong | Oszthatóság 31-gyel | cpp17 | Forditási hiba |
#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n, db=0;
if(n%31==0)
{
cout << "IGEN" << endl;
}
else
{
cout << "NEM" << endl;
}
do
{
n=n/10-3*(n%10);
if(n>=0)
cout << n << " ";
}while(n>0);
if(db==1)
cout << "\n";
return 0;
}
open /var/local/lib/isolate/423/box/a.out: no such file or directory
main.cpp: In function 'int main()':
main.cpp:8:15: error: 'db' was not declared in this scope
8 | cin >> n, db=0;
| ^~