Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- //zmienne
- float w1,w2;
- int a, b, h;
- int main()
- {
- cout.unsetf ( std::ios::floatfield );
- cin>>h;
- for(int i=0; i<h; i++)
- {
- cin>>a>>b;
- int m=100-a;
- w1=(m-(b*m)/100);
- w2=(100-w1);
- cout.precision(2);
- cout.setf( std::ios::fixed, std:: ios::floatfield );
- cout<<w2<<endl;
- w1=0;w2=0;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement