From 34973ca4da73160ba30502c48f43d489501272a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB?= <92202960+rur7@users.noreply.github.com> Date: Sun, 26 Dec 2021 16:21:05 +0300 Subject: [PATCH] Add files via upload --- "4_\320\233\320\260\320\261\320\260_4.cpp" | 50 ++++++++++++++++++ "4_\320\233\320\260\320\261\320\260_5.cpp" | 57 +++++++++++++++++++++ "4_\320\233\320\260\320\261\320\260_6.cpp" | 59 ++++++++++++++++++++++ 3 files changed, 166 insertions(+) create mode 100644 "4_\320\233\320\260\320\261\320\260_4.cpp" create mode 100644 "4_\320\233\320\260\320\261\320\260_5.cpp" create mode 100644 "4_\320\233\320\260\320\261\320\260_6.cpp" diff --git "a/4_\320\233\320\260\320\261\320\260_4.cpp" "b/4_\320\233\320\260\320\261\320\260_4.cpp" new file mode 100644 index 0000000..6c798ae --- /dev/null +++ "b/4_\320\233\320\260\320\261\320\260_4.cpp" @@ -0,0 +1,50 @@ +#include +#include + +using namespace std; + +int main() +{ + int x,y[0],s,s1,k,n,m,q,w,x1; + cout <<"Введите число: "; + if (cin>>x) + { + s=0; + x1=x; + while (x) + { + x=x/10; + s++; + } + k=0; + n=10; + m=1; + s1=0; + q=0; + w=0; + while (s!=s1) + { + y[k]=x1%n/m; + s1++; + n=n*10; + m=m*10; + q=y[k]%2; + if (q==0) + { + w=w+y[k]; + } + } + cout < +#include + +using namespace std; + +int main() +{ +double x,y,z,D,f1,f2; +cout <<"Введите переменную x : "; +if (cin>>x) +{ + cout <<"Введите переменную y : "; + if (cin>>y) + { + cout <<"Введите переменную z : "; + if (cin>>z) + { + D=pow(y,2)-4*x*z; + cout <<"Дискриминант = "<0) + { + f1=(-y+pow(D,0.5))/(2*x); + f2=(-y-pow(D,0.5))/(2*x); + cout <<"Первый корень уравнения: "< +#include + +using namespace std; + + +int x,y,s,s1,f[0],x1,w,n,m,k; +void fun () +{ + while (s!=s1) + { + f[k]=x1%n/m; + s1++; + n=n*10; + m=m*10; + w=w*f[k]; + } +} + + +int main() +{ +zan: +cout <<"Введите шестизначное число: "; +if (cin>>x) +{ + x1=x; + s=0; + s1=0; + n=10; + m=1; + k=0; + w=1; + while (x) + { + x=x/10; + s++; + } + if (s==6) + { + fun (); + cout <