Untitled
raw download clone
TEXT
views 25
,
size 221 b
#include<stdio.h>

int main(){
	int hour, minute;
	scanf("%2d%2d", &hour, &minute);
	if(hour>=12){
		hour-=12;
		printf("%02d:%02d p.m.", hour, minute);
	}
	else{
		printf("%02d:%02d a.m.", hour, minute);
	}
}
close fullscreen
Login or Register to edit or fork this paste. It's free.