ش | ی | د | س | چ | پ | ج |
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
به زبان سی پلاس پلاس، برنامهای بنویسید که شمارهی یک روز در سال را از کاربر دریافت کند و تاریخ معادل آن (شمارهی روز در ماه و شمارهی ماه در سال) را بیابد. در صورتی که عددی کوچکتر از 1 یا بزرگتر از 366 دریافت شود، خروج از برنامه رخ میدهد.
Write a program in C++ which receives the number of a day in the year and finds its corresponding date (the number of the day in the month and the number of the month in the year) in the Persian Solar Calendar. If the input is an integer less than 1 or greater than 366, the program is terminated.