#include <iostream>
using namespace std;
string CheckNumber(int N) {
N = abs(N);
int counter = 0;
while (N > 0) {
if (N % 10 == 9)
counter++;
N /= 10;
}
if (counter == 1)
return "Да";
return "Нет";
signed main() {
setlocale(LC_ALL, "Rus");
int N;
cout << "Введите число: ";
cin >> N;
cout << CheckNumber(N);
return 0;
#include <iostream>
using namespace std;
string CheckNumber(int N) {
N = abs(N);
int counter = 0;
while (N > 0) {
if (N % 10 == 9)
counter++;
N /= 10;
}
if (counter == 1)
return "Да";
return "Нет";
}
signed main() {
setlocale(LC_ALL, "Rus");
int N;
cout << "Введите число: ";
cin >> N;
cout << CheckNumber(N);
return 0;
}