Advertisement
Guest User

Untitled

a guest
Oct 31st, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. //zmienne
  4. float w1,w2;
  5. int a, b, h;
  6. int main()
  7. {
  8.     cout.unsetf ( std::ios::floatfield );
  9.     cin>>h;
  10.     for(int i=0; i<h; i++)
  11.     {
  12.     cin>>a>>b;
  13.     int m=100-a;
  14.     w1=(m-(b*m)/100);
  15.     w2=(100-w1);
  16.     cout.precision(2);
  17.     cout.setf( std::ios::fixed, std:: ios::floatfield );
  18.     cout<<w2<<endl;
  19.     w1=0;w2=0;
  20.     }
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement