#include <iostream>
void main()
{
int x;
std::cin>>x;
int sum = 0;
int prod = 1;
while(x>0)
int y = x%10;
sum = sum + y;
prod = prod * y;
x=x/10;
}
if(sum%10 == 0 && prod < 100)
std::cou<<"Yes"<<endl;
else:
std::cout<<"No"<<endl;
Pascal
var n,digit,sum,prod:integer;
begin
readln(n);
sum = 0;
prod = 1;
while (n>0) do
digit:=n mod 10;
sum = sum+digit;
prod = prod * digit;
n:=n div 10;
end;
if(sum mod 10=0)and(prod<100)
writeln("да");
end
else
writeln("Нет"):
Как то так
end.
#include <iostream>
void main()
{
int x;
std::cin>>x;
int sum = 0;
int prod = 1;
while(x>0)
{
int y = x%10;
sum = sum + y;
prod = prod * y;
x=x/10;
}
if(sum%10 == 0 && prod < 100)
std::cou<<"Yes"<<endl;
else:
std::cout<<"No"<<endl;
}
Pascal
var n,digit,sum,prod:integer;
begin
readln(n);
sum = 0;
prod = 1;
while (n>0) do
begin
digit:=n mod 10;
sum = sum+digit;
prod = prod * digit;
n:=n div 10;
end;
if(sum mod 10=0)and(prod<100)
begin
writeln("да");
end
else
begin
writeln("Нет"):
end;
Как то так
end.