当前位置:网站首页>第五章
第五章
2020-11-08 20:18:00 【半勺咖啡】
1.# ··· #include<stdio.h> #define MIn_PER_HOU 60 int main(int argc,char*argv[]){ int hours, minutes, input; printf("CONVERT MINUTES TO HOURS!\n"); printf("PLEASE INPUT THE NUMBER OF MINUTES:"); scanf("%d", &input); while (input > 0) { hours = input / MIn_PER_HOU; minutes = input % MIn_PER_HOU; printf("CONVERT TO %d HOUR AND %d MINUTES\n", hours, minutes); printf("PLEASE CONTINUE INPUT THE NUMBER OF MINUTES:"); scanf("%D", &input); } printf("PROGRAM EXIT!\n"); }
#include<stdio.h>
void main() { int a, b; printf("输入数字:"); scanf("%d", &a); b = a; while (b <= a + 10) { printf("%d\n", b); b++; }
}
#include<stdio.h>
void main() { int b; printf("输入天数:"); scanf("%d", &b); while (b >0) { printf("%d days are %d weeks, %d days.\n", b,b/7,b%7); printf("输入天数:"); scanf("%d", &b); }
}
#include<stdio.h>
void main() { float b; printf("输入身高:"); scanf("%f", &b); while (b > 0) { printf("%.0fcm =%.2f feet,%.2f inches\n", b, b / 30.48, b / 2.54); printf("输入身高:"); scanf("%d", &b); }
}
版权声明
本文为[半勺咖啡]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/4741335/blog/4708318
边栏推荐
猜你喜欢

PAT_甲级_1056 Mice and Rice

接口测试用例思路总结

【Elasticsearch 技术分享】—— 十张图带大家看懂 ES 原理 !明白为什么说:ES 是准实时的!

Why need to use API management platform

【云服务】阿里云服务器ECS实例规格那么多,如何选型?最佳实践说明

Regular backup of WordPress website program and database to qiniu cloud

IT行业薪资一直遥遥领先!十年后的程序员,是否还是一个高薪职业?

Opencv solves the problem of ippicv download failure_ 2019_ lnx_ intel64_ general_ 20180723.tgz offline Download

Simple process of reading pictures by QT program developed by Python

Flink's sink: a preliminary study
随机推荐
net.sf.json . jsonobject's format processing of time stamp
Learn volatile, you change your mind, I see
数组初相识
CountDownLatch 瞬间炸裂!同基于 AQS,凭什么 CyclicBarrier 可以这么秀?
WordPress网站程序和数据库定时备份到七牛云图文教程
C / C + + knowledge sharing: function pointer and pointer function, can you understand after reading this article?
Array acquaintance
Exercise 5
趣文分享:C 语言和 C++、C# 的区别在什么地方?
Package subsystem in Simulink
学会了volatile,你变心了,我看到了
Your random IO hard disk
Dynamic programming: maximum subarray
Infix expression to suffix expression
experiment
How much faster is a server equipped with a SSD than a mechanical hard disk
SQL quick query
微信小程序相关
【Elasticsearch 技术分享】—— 十张图带大家看懂 ES 原理 !明白为什么说:ES 是准实时的!
寻找性能更优秀的动态 Getter 和 Setter 方案