实验2-2

# include <stdio.h>
int main()
{
    int a,b,c;
    printf("请输入   分钟:");
    scanf("%d",&a);
    b=a/60;
    c=a%60;
    printf("%d分钟=%d小时%d分钟",a,b,c);
    return 0;
}

最后的printf语句中a与%d”间忘记加“,”,应注意。

posted @ 2016-10-06 15:51  宁萌啊  阅读(60)  评论(0编辑  收藏  举报