second,min,hour,day,week:longint
begin
readln(second)
min:=second div 60 second:=second mod 60
hour:=min div 60 min:=min mod 60
day:=hour div 24 hour:= hour mod 24
week:=day div 7 day:=day mod 7
writeln('week=',week,'day=',day,'hour=',hour)
readln
end.
#include <stdio.h>int main()
{
int a,b
printf("Enter a 24-hour time: ")
scanf("%d:%d",&a,&b)
if (a<=12)
{printf("Equivalent 12-hour time: %d:%d AM\n",a, b)
}
else if(a == 24)
{ printf("Equivalent 12-hour time: %d:%d PM\n",00, b)
}
else
printf("Equivalent 12-hour time: %d:%d AM\n",a-12, b)
return 0}
#include<stdio.h>void main()
{
int i,m,n
i=560
m=i/60
n=i%60
printf("%d等于%d时%d分。\n",i,m,n)
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)