0% found this document useful (0 votes)
5 views6 pages

Code

The document contains multiple C++ code snippets that perform various operations such as checking conditions on numbers, determining properties of triangles, and validating the sides of quadrilaterals. Each snippet includes input prompts and conditional statements to provide outputs based on user input. The overall theme revolves around basic programming constructs and mathematical checks.

Uploaded by

emilrehimli298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Code

The document contains multiple C++ code snippets that perform various operations such as checking conditions on numbers, determining properties of triangles, and validating the sides of quadrilaterals. Each snippet includes input prompts and conditional statements to provide outputs based on user input. The overall theme revolves around basic programming constructs and mathematical checks.

Uploaded by

emilrehimli298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1) #include <iostream> 3) #include <iostream>

using namespace std; using namespace std;

int main() { int main() {

int a,b; int n,a,b,c,d,f;

cin>>a>>b; cout<<"5reqemli eded";

if(a>b){ cin>>n;

cout<<"x="<<a<<"y="<<b; a=n/10000;

}else{ b=(n/1000)%10;

cout<<"x="<<b<<"y="<<a; c=(n/100)%10;

} d=(n/10)%10;

return 0; f=n%10;

} if(a==b || a==c || a==d || a==f){

cout<<"yes";

2) #include <iostream> }else if(b==a || b==c || b==d || b==f){

using namespace std; cout<<"yes";

int main() { } else if(c==a || c==b || c==d || c==f){

int a,b,c; cout<<"yes";

cout<<"2 regemli eded"; } else if(d==a || d==b || d==c || d==f){

cin>>a; cout<<"yes";

b=a/10; } else if(f==a || f==b || f==c || f==d){

c=a%10; cout<<"yes";

cout<<((c*10)+b); } else{

return 0; cout<<"no";

} }

return 0;

}
4)# include <iostream> 5) #include <iostream>

using namespace std; using namespace std;

int main() { int main() {

int n,a,b,c,d; int n,a,b,c,d,s;

cout<<"4 regemli eded"; cout<<"4 regemli eded";

cin>>n; cin>>n;

a=n/1000; a=n/1000;

b=(n/100%10); b=(n/100%10);

c=(n/10)%10; c=(n/10)%10;

d=n%10; d=n%10;

if(a==3 && b==7){ s=a+b+c+d;

cout<<"yes"; if(s%2==0 && s%3==0){

} else if(b==3 && c==7){ cout<<"yes";

cout<<"yes"; } else {

} else if(c==3 && d==7){ cout<<"no";

cout<<"yes"; }

} else{ return 0;

cout<<"no"; }

return 0;

}
6) #include <iostream> 8) #include <iostream>

using namespace std; using namespace std;

int main() { int main() {

int n,a,b,c,d; double a,b;

cout<<"4 regemli eded"; cin>>a>>b;

cin>>n; if(a<=b){

a=n/1000; double a=0;

b=(n/100%10); cout<<a<<" "<<b;

c=(n/10)%10; } else {

d=n%10; cout<<a<<" "<<b;

if(n%a==0 && n%b==0 & n%c==0 && n%d==0){ }

cout<<"yes"; return 0;

} else{ }

cout<<"no"; 9) #include <iostream>

} using namespace std;

return 0; int main() {

} double a,b,c;

cin>>a>>b>>c;

7) #include <iostream> if(a<3 && a>1){

using namespace std; cout<<a;

int main() { }else if(b<3 && b>1){

double x,y,z; cout<<b;

cin>>x>>y>>z; } else if(c<3 && c>1){

if(x>y && x>z){ cout<<c;

cout<<x; }

} else if(y>z && y>x){ return 0;

cout<<y; }

} else{

cout<<z;

return 0;

}
10) #include <iostream> 11) #include <iostream>

using namespace std; using namespace std;

int main() { int main() {

double x,y; double a,b,c,d;

x!=y; cin>>a>>b>>c>>d;

cin>>x>>y; if(d<=c && c<=b && b<=a){

if(x<0){ b==a;

if(x>y){ c==a;

cout<<x; d==a;

} else{ cout<<a<<" "<<b<<" "<<c<<" "<<d;

cout<<y; } else if(a<b && b<c && c<d){

} cout<<a<<" "<<b<<" "<<c<<" "<<d;

} else{ } else {

if(x<y){ cout<<(a*a)<<" "<<(b*b)<<" "<<(c*c)<<"


"<<(d*d)<<endl;
cout<<x;
}
} else{
return 0;
cout<<y;
}
}

return 0;

}
12) #include <iostream> 14) #include <iostream>

#include <cmath> #include <cmath>

using namespace std; using namespace std;

int main() { int main() {

double x,y; double a,b,c;

cin>>x>>y; cout<<"ucbucagin 3 terefi; ";

if(x<0 && y<0){ cin>>a>>b>>c;

cout<<fabs(x)<<" "<<fabs(y); if(a+b>c && a+c>b && b+c>a){ //(ucbucaq qurmaq


olar mi?
} else if(x<0 || y<0){
if(a*a+b*b==c*c || b*b+c*c==a*a || a*a+c*c==b*b)
cout<<x+0.5<<" "<<y+0.5; {
} else if(!(x>=0.5 && x<=2) || !(y>=0.5 && y<=2)){ cout<<"duzbucaqli ucbucaq";
cout<<x/10<<" "<<y/10; } else if(sqrt(a*a+b*b)>c || sqrt(a*a+c*c)>b ||
} else { sqrt(b*b+c*c)>a){

cout<<x<<' '<<y; cout<<"iti bucaqdir";

} } else{

return 0; cout<<"korbucaqdir";

} }

13) #include <iostream> } else {

cout<<"ucbucaq qurmaq mumkun deyil";


using namespace std;
}
int main() {
return 0;
double a,b,c;
}
cout<<"ucbucagin 3 terefi; ";

cin>>a>>b>>c;

if(a+b>c && a+c>b && b+c>a){

cout<<"yes";

} else{

cout<<"no";

return 0;

}
15) #include <iostream>

using namespace std;

int main() {

int a,b,c,d;

cout<<"dordbucaqlinin terefleri;";

cin>>a>>b>>c>>d;

if(a+b+c>d && a+c+d>b && b+c+d>a && a+b+d>c){

cout<<"yes";

} else {

cout<<"no";

return 0;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy