Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int x1,x2,x3,x4,x5,n,P,S;
  9. cout<<"x1=";
  10. cin>>x1;
  11. cout<<"x2=";
  12. cin>>x2;
  13. cout<<"x3=";
  14. cin>>x3;
  15. cout<<"x4=";
  16. cin>>x4;
  17. cout<<"x5=";
  18. cin>>x5;
  19.  
  20. if(1>=1 && x2>=0 && x3>=0 && x4>=0 && x5>=0)
  21. n=x1*10000+x2*1000+x3*100+x4*10+x5;
  22. S=x3+x4;
  23. P=x3*x4;
  24. else;
  25. cout<<"nu exista solutii";
  26.  
  27. cout<<"n="<<n<<endl;
  28. cout<<"S="<<S<<endl;
  29. cout<<"P="<<P<<endl;
  30.  
  31. return 0;
  32.  
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement