C Primer Plus5-1
来源:互联网 发布:快递怎么延长收货 淘宝 编辑:程序博客网 时间:2024/06/04 18:24
/*1.编写一个程序。将用分钟表示的时间转换成以小时和分钟表示的时间。使用#define 或者 const来创建一个代表 60 的符号常量。使用 while 循环来允许用户重复键入值,并且当键入一个小于等于 0 的时间时终止循环。*/#include<stdio.h>#include<stdlib.h>#define time 60int main() { int minute; printf("Please input time:"); scanf("%d", &minute); while(minute > 0) { printf("%d hours %d minutes\n", minute / time, minute % time); printf("Please input time:"); scanf("%d", &minute); } system("pause"); return 0; }
0 0
- C Primer Plus5-1
- C Primer Plus5-2
- C Primer Plus5-3
- C Primer Plus5-4
- C Primer Plus5-5
- C Primer Plus5-6
- C Primer Plus5-7
- C Primer Plus5-8
- 重读C++Primer-1
- C primer 读书笔记1
- c++primer笔记1
- C Primer Plus2-1
- C Primer Plus3-1
- C Primer Plus4-1
- C Primer Plus6-1
- C Primer Plus7-1
- C Primer Plus8-1
- C Primer Plus9-1
- 基于Spring框架的文件下载
- linux常用命令
- ehci ohci uhci解释
- redis主从复制过程中,slave端混读PING命令的问题
- MD5加密
- C Primer Plus5-1
- 以太坊智能合约编程之菜鸟教程
- [1,2,3].forEach(alert);这种写法有什么利和弊吗?
- C Primer Plus5-2
- [转载]Hive如何控制Map和Reduce个数
- 简单的时间段选择控件
- Java Field[] Field理解
- 【转】自定义presentviewcontroller和pushviewcontroller转场动画
- Ogre2.1 灯光与阴影