Advertisement
idsystems

CPP_Practica48 - Dia Semana

Jan 30th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. // Program: diasemana.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 dia;
  12.  
  13.    cout << "Dia de la semana" << endl;
  14.    cout << "================" << endl;
  15.  
  16.    cout << "Entre un numero (1-7)= "; cin >> dia;
  17.  
  18.    switch( dia )
  19.    {
  20.       case 1: cout << "Domingo" << endl; break;
  21.       case 2: cout << "Lunes" << endl; break;
  22.       case 3: cout << "Martes" << endl; break;
  23.       case 4: cout << "Miercoles" << endl; break;
  24.       case 5: cout << "Jueves" << endl; break;
  25.       case 6: cout << "Viernes" << endl; break;
  26.       case 7: cout << "Sabado" << endl; break;
  27.       default: cout << "No entiendo" << endl;
  28.    }
  29.  
  30.    return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement