#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
n = abs(n);
int a[4];
for(int i=0; i<4; i++)
a[i] = n % 10;
n = n / 10;
}
for(int i=0; i<3; i++)
for (int j=i+1; j<4; j++)
if(a[i] == a[j])
cout << "Neverno";
return 1;
};
cout << "Verno";
return 0;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
n = abs(n);
int a[4];
for(int i=0; i<4; i++)
{
a[i] = n % 10;
n = n / 10;
}
for(int i=0; i<3; i++)
for (int j=i+1; j<4; j++)
{
if(a[i] == a[j])
{
cout << "Neverno";
return 1;
}
};
cout << "Verno";
return 0;
}