Ответы на вопрос:
c++:
#include
#include
using std: : cin,std: : cout,std: : string;
int main(){
string st;
cin > > st;
for (auto i: st ){
if (i == '4'){
cout < < "yes";
return 0;
}
}
cout < < "no";
return 0;
}
#python
def searh_4(a):
flag=false
for i in (str(a)):
if int(i)==4:
flag=true
return flag
//c++
#include
using namespace std;
bool nod(int a) {
int d;
d = a;
while (d! =0 ){
int f;
f = d % 10;
if (f==4) {
return true;
}
d =d/ 10;
}
return false;
}
int main() {
cout < < nod(1234521);
system("pause");
}
Популярно: Информатика
-
ketgalyschko21.05.2023 18:43
-
csczzz06.12.2021 04:43
-
милан6448829.09.2022 23:47
-
dilya6920230.03.2020 02:27
-
sansankushnir2p08nd516.11.2020 22:02
-
Arcator02.02.2022 09:50
-
ytt230.05.2023 11:14
-
alibaevaalina14629.07.2022 17:27
-
яблоко5031.03.2022 03:43
-
Yaklaura24.06.2021 10:40