va rog ajutor dau coroana!!!
Răspunsuri la întrebare
Răspuns:
Explicație:
1. #include<iostream>
using namespace std;
int main(){
int a,b,x;
cin>>a>>b>>x;
if(x>=a && x<=b)
cout<<"DA";
return 0;
}
2. #include<iostream>
using namespace std;
int main(){
int a,b,c,max;
cin>>a>>b>>c;
max=a;
if(b>max)
max=b;
if(c>max)
max=c;
cout<<max;
return 0;
}
3. #include<iostream>
using namespace std;
int main(){
int a,b;
int suma_cifre_a=0,suma_cifre_b=0;
cin>>a>>b;
int nr_a=a;
int nr_b=b;
while(a!=0)
{ int d=a%10;
suma_cifre_a+=d;
a=a/10;
}
while(b!=0)
{ int e=b%10;
suma_cifre_b+=e;
b=b/10;
}
if(suma_cifre_a>suma_cifre_b)
cout<<nr_a;
else cout<<nr_b;
return 0;
}
4.#include<iostream>
using namespace std;
int main(){
int a,b,c,x;
cin>>a>>b>>c>>x;
if(a%x==0 && b%x==0 &&c%x==0)
cout<<"DA"; else cout<<"NU";
return 0;
}