pls la informarica,trebuie doar 3(care vreti)
Răspunsuri la întrebare
1.
#include <iostream>
using namespace std;
int main() {
float a,b,c;
cin>>a>>b>>c;
cout<<(a+b+c)/3;
return 0;
}
2.
#include <iostream>
using namespace std;
int main() {
int x,y;
cin>>x>>y;
if(x>10){
cout<<x;
}
else{
cout<<"Nu exista";
}
cout<<" ";
if(y>10){
cout<<y;
}
else{
cout<<"Nu exista";
}
}
3.
#include <iostream>
using namespace std;
int main() {
int x,y;
cin>>x>>y;
if(x>=0 && y>=0){
cout<<x+y;
}
if(x<0 && y<0){
cout<<x*y;
}
if((x<0 && y>=0) || (x>=0 && y<0)){
cout<<"mesaj";
}
}
4.
#include <iostream>
using namespace std;
int main() {
int x;
cin>>x;
cout<<x%10;
return 0;
}
5.
#include <iostream>
using namespace std;
int main() {
int x;
cin>>x;
if(x%11==0){
cout<<"Da e divizibil cu 11";
}
else{
cout<<"Nu e divizibil cu 11";
}
return 0;
}
6.
#include <iostream>
using namespace std;
int main() {
int x;
cin>>x;
cout<<x/10%10;
return 0;
}