11727 - Cost Cutting | UVa - Samsus Salehin Sabbir

Header Ads

11727 - Cost Cutting | UVa

Problem Link : 11727 - Cost Cutting

Solution :
      Develop by
 Samsus Salehin Sabbir 




  1. #include <iostream>
  2. using namespace std;
  3. \\ Find Out Middle Number .. Its A easy problem 
  4. int main(void) {
  5. long long x , y , z , t;
  6. cin >> t;
  7. for(int i=0;i<t;i++){
  8. cin >> x >> y >> z ;
  9. if((x>y && x<z) || (x<y && x>z)) cout << "Case " << i+1 << ": " << x << endl;
  10. else if((y>x && y<z) || (y<x && y>z)) cout << "Case " << i+1 << ": " << y << endl;
  11. else if((z>x && z<y) || (z<x && z>y)) cout << "Case " << i+1 << ": " << z << endl;
  12. }
  13. return 0;
  14. }

No comments

Powered by Blogger.