当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- CMS garbage collector
- 【Elasticsearch 技术分享】—— 十张图带大家看懂 ES 原理 !明白为什么说:ES 是准实时的!
- 程序员都应该知道的URI,一文帮你全面了解
- 动态规划答疑篇
- Is parameter passing in go language transfer value or reference?
- IT industry salary has been far ahead! Ten years later, is the programmer still a high paying profession?
- Select sort
- Server side resolution of lengthfieldbasedframedecoder of GetBytes
- Deep copy
- npm install 无响应解决方案
猜你喜欢
Dynamic planning
200 programmers interview experience, all here
单例模式的五种设计方案
git操作与分支管理规范
The interface testing tool eolinker makes post request
Part 1 - Chapter 2 pointer operation
Chapter 2 programming exercises
I used Python to find out all the people who deleted my wechat and deleted them automatically
进程 线程 协程
Creating a text cloud or label cloud in Python
随机推荐
VirtualBox安装centos7
Dynamic relu: Microsoft's refreshing device may be the best relu improvement | ECCV 2020
The minimum insertion times of palindrome
Why need to use API management platform
为什么需要使用API管理平台
Deep copy
. net core cross platform resource monitoring library and dotnet tool
使用基于GAN的过采样技术提高非平衡COVID-19死亡率预测的模型准确性
线程池运用不当的一次线上事故
动态规划答疑篇
给大家介绍下,这是我的流程图软件 —— draw.io
Array acquaintance
Part 1 - Chapter 2 pointer operation
[elastic search technology sharing] - ten pictures to show you the principle of ES! Understand why to say: ES is quasi real time!
Process thread coroutine
Regular backup of WordPress website program and database to qiniu cloud
Exercise 5
如果把编程语言当武功绝学!C++是九阴真经,那程序员呢?
IT行业薪资一直遥遥领先!十年后的程序员,是否还是一个高薪职业?
数组初相识