Public paste
Undefined
By: sdfsdfs | Date: Jan 8 2009 16:55 | Format: C++ | Expires: never | Size: 756 B | Hits: 885

  1. // d3v.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <string>
  7. using namespace std;
  8.  
  9. bool ishot(int grad = 20);
  10. bool ishot(int grad, bool summert1me);
  11. int main()
  12. {
  13. int grad;
  14. cout<<"wieviel grad?"<<endl;
  15. cin>>grad;
  16.  
  17. if(ishot(grad)){
  18.         cout<<"es ist heiss"<<endl;
  19. }else{
  20.         cout<<"es ist nicht heiss"<<endl;
  21. }
  22. if(ishot(grad,false)){
  23.         cout<<"es ist heiss und sommer";
  24. }
  25. else{
  26. cout<<"nur bei uns heiss im haus";
  27. }
  28. return 0;
  29. }
  30. bool ishot(int grad, bool summert1me)
  31. {
  32.         if(grad>30){
  33.                 if(summert1me){
  34.                         return true;
  35.         }else{
  36. return false;
  37.         }
  38.         }else{
  39.                 return false;
  40. }
  41. }
  42. bool ishot(int grad){
  43.         if(grad>30){
  44.                 return true;
  45.         }else{
  46.                 return false;
  47.         }
  48.  
  49. }