al__nasim

easy problem

Nov 23rd, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int ts;
  6. cout<<"test cases: "<<endl;
  7. cin>>ts;
  8. for(int p = 1; p <= ts; p++){
  9. cout<<"time: "<<endl;
  10. double t, velocity;
  11. cin>>t;
  12. cout<<"Average velocity: "<<endl;
  13. cin>>velocity;
  14. double ans = (t*velocity)/(12.00*1.0);
  15. printf("Litres needed %0.3lf\n", ans);
  16. }
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment