Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- main () {
- int lungh[4] = {31,28,31,30};
- for (int i = 0; i < 4; i++) {
- for (int j = 1; j <= lungh[i]; j++) {
- cout << j << " ";
- switch (i) {
- case 0:
- cout << "gennaio\n";
- break;
- case 1:
- cout << "febbraio\n";
- break;
- case 2:
- cout << "marzo\n";
- break;
- case 3:
- cout << "aprile\n";
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment