Skip to content

Commit 6c68b29

Browse files
committed
local
1 parent 6d5271d commit 6c68b29

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include<iostream>
2+
using namespace std;
3+
4+
int main() {
5+
6+
int days;
7+
while(true) {
8+
cin >> days;
9+
10+
int years = days / 360;
11+
days = days % 360; // now we remove # of complete years
12+
13+
int months = days / 30;
14+
days = days % 30;
15+
16+
cout<<years<<" "<<months<<" "<<days<<"\n";
17+
}
18+
19+
return 0;
20+
}
21+

0 commit comments

Comments
 (0)