Advertisement
alaminrifat

URI -1020 with C++

Apr 6th, 2020
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {  
  5.     int N,y,m1,m,d;
  6.     cin>>N;
  7.     y = N / 365;
  8.     m1 = N % 365;
  9.     m = m1 / 30;
  10.     d = m1 % 30;
  11.     cout<<y<<" ano(s)"<<endl;
  12.     cout<<m<<" mes(es)"<<endl;
  13.     cout<<d<<" dia(s)"<<endl;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement