Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- int den = 7;
- int mesec = 3;
- for (int i = 0; i < n; i++)
- {
- den++;
- if (den == 32 and mesec == 3)
- {
- mesec = 4;
- den = 1;
- }
- if (den == 31 and mesec == 4)
- {
- mesec = 5;
- den = 1;
- }
- }
- cout << den << ". ";
- if (mesec == 3)
- {
- cout << "mart";
- }
- if (mesec == 4)
- {
- cout << "april";
- }
- if (mesec == 5)
- {
- cout << "maj";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement