scanf/printf做法
#include<cstdio>
int main()
{
int n;
scanf("%d",&n);
printf("%d ano(s)\n",n/365);n%=365;
printf("%d mes(es)\n",n/30);n%=30;
printf("%d dia(s)\n",n);
return 0;
}
cin/cout做法
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
cout<<n/365<<" ano(s)"<<endl;
cout<<n%365/30<<" mes(es)"<<endl;
cout<<n%365%30<<" dia(s)"<<endl;
return 0;
}