DrRuckingFetard

Temperature converter

May 28th, 2015
551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.  
  7. float l;
  8. float h;
  9. int s;
  10.  
  11.  
  12. cout<<"Please give in a lower limit, limit >= 0: "<<endl;
  13. cin>>l;
  14. cout<<"Please give in a higher limit, 10 > limit ,= 50000: "<<endl;
  15. cin>>h;
  16. cout<<"Please give in a step, 0 < step <= 10: "<<endl;
  17. cin>>s;
  18. cout<<""<<endl;
  19. cout<<"Celsius"<<"          "<<"Fahrenheit"<<endl;
  20. cout<<"-------"<<"          "<<"----------"<<endl;
  21.  
  22. for(int i=l; i <=h; i = i+s)
  23. {
  24.     cout<<left<<setprecision(8)<<showpoint<<i<<endl;
  25.  
  26. }
  27.  
  28.  
  29.  
  30. return 0;
  31. }
Add Comment
Please, Sign In to add comment