当前位置:网站首页>第五章
第五章
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
边栏推荐
- Python 列表的11个重要操作
- 第二章编程练习
- Using GaN based oversampling technique to improve the accuracy of model for mortality prediction of unbalanced covid-19
- Countdownlatch explodes instantly! Based on AQS, why can cyclicbarrier be so popular?
- 单例模式的五种设计方案
- Five design schemes of singleton mode
- Dynamic ReLU:微软推出提点神器,可能是最好的ReLU改进 | ECCV 2020
- C/C++学习日记:原码、反码和补码
- Express框架
- Django之简易用户系统(3)
猜你喜欢
Flink系列(0)——准备篇(流处理基础)
Five design schemes of singleton mode
I used Python to find out all the people who deleted my wechat and deleted them automatically
线程池运用不当的一次线上事故
If the programming language as martial arts unique! C++ is Jiu Yin Jing. What about programmers?
精通高并发与多线程,却不会用ThreadLocal?
搭载固态硬盘的服务器究竟比机械硬盘快多少
An online accident caused by improper use of thread pool
Dynamic ReLU:微软推出提点神器,可能是最好的ReLU改进 | ECCV 2020
The minimum insertion times of palindrome
随机推荐
What is forsage Ethereum smart contract? What is the global decline of Ethereum
AI香水来了,你会买吗?
Five phases of API life cycle
I used Python to find out all the people who deleted my wechat and deleted them automatically
Dynamic planning
VirtualBox安装centos7
Suffix expression to infix expression
Solve the failure of go get download package
getBytes之 LengthFieldBasedFrameDecoder服务端解析
python开发qt程序读取图片的简单流程
Looking for a small immutable dictionary with better performance
简明 VIM 练级攻略
net.sf.json . jsonobject's format processing of time stamp
存储过程动态查询处理方法
我用 Python 找出了删除我微信的所有人并将他们自动化删除了
动态规划之子序列问题解题模板
使用Fastai开发和部署图像分类器应用
11 important operations of Python list
One minute comprehensive understanding of forsage smart contract global shared Ethereum matrix plan
Why need to use API management platform