Advertisement
Infiniti_Inter

Untitled

Feb 9th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7. float a;
  8. cin >> a;
  9. float b;
  10. cin >> b;
  11. a *= b;
  12. if (int (a) == a)
  13. cout << a;
  14. else
  15. {
  16. cout << fixed << setprecision(3) << a;
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement