Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- int x1,x2,x3,x4,x5,n,P,S;
- cout<<"x1=";
- cin>>x1;
- cout<<"x2=";
- cin>>x2;
- cout<<"x3=";
- cin>>x3;
- cout<<"x4=";
- cin>>x4;
- cout<<"x5=";
- cin>>x5;
- if(1>=1 && x2>=0 && x3>=0 && x4>=0 && x5>=0)
- n=x1*10000+x2*1000+x3*100+x4*10+x5;
- S=x3+x4;
- P=x3*x4;
- else;
- cout<<"nu exista solutii";
- cout<<"n="<<n<<endl;
- cout<<"S="<<S<<endl;
- cout<<"P="<<P<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement