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 = 1; i <= n; i += 1) {
- den += 1;
- if(mesec == 3 and den == 32) {
- den = 1;
- mesec = 4;
- }
- if(mesec == 4 and den == 31) {
- den = 1;
- mesec = 5;
- }
- }
- cout << den << ". ";
- if(mesec == 3) {
- cout << "mart" << endl;
- }
- else if(mesec == 4) {
- cout << "april" << endl;
- }
- else {
- cout << "maj" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement