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 momentalen_den = 7;
- int mesec = 3;
- for(int i = 1; i <= n; i++) {
- momentalen_den++;
- if(momentalen_den == 32 && mesec == 3) {
- mesec++;
- momentalen_den = 1;
- }
- if(momentalen_den == 31 && mesec == 4) {
- mesec++;
- momentalen_den = 1;
- }
- }
- cout << momentalen_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