#include
#include "genlib.h"
#include "simpio.h"
int main(void)
{
int digit1, digit2, digit3, digit4, newnum, number;
number=GetInteger();
digit1=((number%10)+9)%10 ;//ge
number/=10 ;
digit2=((number%10)+9)%10 ;//shi
number/=10 ;
digit3=((number%10)+9)%10 ;//bai
number/=10 ;
digit4=((number%10)+9)%10 ;//qian
newnum = 1000* digit2 + 100*digit1 + 10*digit4 + digit3 ;
/*---------*/
printf("The encrypted number is %d\n", newnum);
}
#include
#include "genlib.h"
#include "simpio.h"
int main(void)
{
int time1, time2, hour, minutes;
time1=GetInteger();
time2=GetInteger();
hour= time2/100 - time1/100 ;
minutes = time2%100 - time1%100 ;
if ( minutes < 0 )
{
hour--;
minutes += 60 ;
}
/*---------*/
printf("The train journey time is %d hours %d minutes.\n", hour, minutes);
}