izaberina

mesi

Jan 11th, 2014
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. main () {
  4.     int lungh[4] = {31,28,31,30};
  5.     for (int i = 0; i < 4; i++) {
  6.         for (int j = 1; j <= lungh[i]; j++) {
  7.             cout << j << " ";
  8.             switch (i) {
  9.                 case 0:
  10.                     cout << "gennaio\n";
  11.                     break;
  12.                 case 1:
  13.                     cout << "febbraio\n";
  14.                     break;
  15.                 case 2:
  16.                     cout << "marzo\n";
  17.                     break;
  18.                 case 3:
  19.                     cout << "aprile\n";
  20.                     break;
  21.             }
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment