Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n, h, m,x=1;
- cin>>n;
- h=n/60;
- m=n%60;
- while (n>=720 && n<=1439)
- {
- h=h-12;
- }
- /* */
- for(int i=1; i<=x; i++)
- {
- cout<<h<<":"<<m<<"PM";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement