Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int n, h, m,x=1;
  7.     cin>>n;
  8.     h=n/60;
  9.     m=n%60;
  10.    
  11.     while (n>=720 && n<=1439)
  12.     {
  13.        h=h-12;
  14.     }
  15.     /* */
  16.     for(int i=1; i<=x; i++)
  17.     {
  18.         cout<<h<<":"<<m<<"PM";
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement