Advertisement
Guest User

Untitled

a guest
Dec 25th, 2011
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6.  
  7. int main()
  8.  
  9. {
  10.  
  11. double input;
  12.  
  13. cout.setf(ios::fixed);
  14.  
  15. cout.precision(2);
  16.  
  17. while(cin>>input)
  18.  
  19. {
  20.  
  21. cout.setf(ios::fixed);
  22.  
  23. cout.precision(2);
  24.  
  25. if(input!=0)
  26. {
  27. cout<<input<<endl;
  28. }
  29. else
  30. {
  31. cout<<"0.00"<<endl;
  32. }
  33.  
  34. }
  35.  
  36.  
  37.  
  38. return 0;
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement