Advertisement
idsystems

CPP_Practica43 - Saludo

Jan 30th, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. // Program: saludo.cc
  2. // Author:  Yoan Pinzon
  3. // Date:    Agosto 30, 2006
  4.  
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.    int hh, mm;
  12.  
  13.    cout << "Saludo" << endl;
  14.    cout << "======" << endl;
  15.  
  16.    cout << "Ingrese un tiempo (hh mm)= "; cin >> hh >> mm;
  17.  
  18.    min = hh * 60 + mm;
  19.  
  20.    if (min >= 360 && min <= 719) cout << "Buenos Dias" << endl;
  21.    if (min >= 720 && min <= 1140) cout << "Buenos Trades" << endl;
  22.    if (min >= 1141 && min <= 359) cout << "Buenos Noches" << endl;
  23.  
  24.    return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement