#include <stdafx.h>
#include <stdio.h>
int main(void)
{
int hour = 0;
int min = 0;
int am = 00;
int pm = 24;
int format = 0;
char dot = ':' || '.';
char zone = 'a' || 'p' ;
printf("Enter time (H:Mx): ");
scanf_s("%d", &hour);
scanf_s("%c", &dot);
scanf_s("%d", &min);
scanf_s("%c", &zone);
printf("time is %d",hour);
printf("%c", &dot);
printf("%d",min);
printf("%c\n",zone);
if ( zone == 'a')
{
format = am + hour;
printf("%d", format);
}
else
{
format = pm - hour;
printf("%d", format);
}
}