Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct mese {
- int num;
- string nome;
- };
- main () {
- mese lungh[12] = {{31,"gennaio"},{28,"febbraio"},{31,"marzo"},{30,"aprile"},{31,"maggio"},{30,"giugno"},{31,"luglio"},{31,"agosto"},{30,"settembre"},{31,"ottobre"},{30,"novembre"},{31,"dicembre"}};
- for (int i = 0; i < 12; i++) {
- for (int j = 1; j <= lungh[i].num; j++) {
- cout << j << " " << lungh[i].nome << endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment