当前位置:网站首页>Chapter five
Chapter five
2020-11-08 20:18:00 【Half a spoon of coffee】
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(" Input number :"); scanf("%d", &a); b = a; while (b <= a + 10) { printf("%d\n", b); b++; }
}
#include<stdio.h>
void main() { int b; printf(" Enter the number of days :"); scanf("%d", &b); while (b >0) { printf("%d days are %d weeks, %d days.\n", b,b/7,b%7); printf(" Enter the number of days :"); scanf("%d", &b); }
}
#include<stdio.h>
void main() { float b; printf(" Enter the height :"); scanf("%f", &b); while (b > 0) { printf("%.0fcm =%.2f feet,%.2f inches\n", b, b / 30.48, b / 2.54); printf(" Enter the height :"); scanf("%d", &b); }
}
版权声明
本文为[Half a spoon of coffee]所创,转载请带上原文链接,感谢
边栏推荐
- Mycat搭建
- AI香水来了,你会买吗?
- 在Python中创建文字云或标签云
- Function classification big PK! How to use sigmoid and softmax respectively?
- Dynamic query processing method of stored procedure
- Common memory leakage scenarios in JS
- (O) Analysis of service manager (1) BinderInternal.getContextObject
- 动态规划之子序列问题解题模板
- To introduce to you, this is my flow chart software—— draw.io
- net.sf.json.JSONObject对时间戳的格式化处理
猜你喜欢
Swagger介绍和应用
如果把编程语言当武功绝学!C++是九阴真经,那程序员呢?
趣文分享:C 语言和 C++、C# 的区别在什么地方?
Looking for better dynamic getter and setter solutions
CountDownLatch 瞬间炸裂!同基于 AQS,凭什么 CyclicBarrier 可以这么秀?
. net core cross platform resource monitoring library and dotnet tool
Django's simple user system (3)
Solution to cross domain problem of front end separation
MongoDB数据库
To introduce to you, this is my flow chart software—— draw.io
随机推荐
趣文分享:C 语言和 C++、C# 的区别在什么地方?
AI香水来了,你会买吗?
【Elasticsearch 技术分享】—— 十张图带大家看懂 ES 原理 !明白为什么说:ES 是准实时的!
C/C++学习日记:原码、反码和补码
Iptables from introduction to mastery
11 important operations of Python list
Case analysis of entitycore framework
I used Python to find out all the people who deleted my wechat and deleted them automatically
Brief VIM training strategy
Implementation of warehouse management system with ABP (net core) + easyUI + efcore
Dynamic planning
采用注解+拦截器的方式进行异步执行的实现方式
Deep copy
给大家介绍下,这是我的流程图软件 —— draw.io
寻找性能更优秀的动态 Getter 和 Setter 方案
Function classification big PK! How to use sigmoid and softmax respectively?
VirtualBox安装centos7
Creating a text cloud or label cloud in Python
使用基于GAN的过采样技术提高非平衡COVID-19死亡率预测的模型准确性
Proficient in high concurrency and multithreading, but can't use ThreadLocal?