当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 寻找性能更优秀的不可变小字典
- I used Python to find out all the people who deleted my wechat and deleted them automatically
- Summary: in October, more investment management strategies have come to the new overseas defi project!
- Exercise 5
- The minimum insertion times of palindrome
- git操作与分支管理规范
- 使用Fastai开发和部署图像分类器应用
- ITerm2 配置和美化
- 使用Fastai开发和部署图像分类器应用
- C / C + + learning diary: original code, inverse code and complement code
猜你喜欢
随机推荐
SQL 速查
[elastic search technology sharing] - ten pictures to show you the principle of ES! Understand why to say: ES is quasi real time!
精通高并发与多线程,却不会用ThreadLocal?
Looking for a small immutable dictionary with better performance
Django之简易用户系统(3)
Suffix expression to infix expression
If the programming language as martial arts unique! C++ is Jiu Yin Jing. What about programmers?
Mongodb database
git操作与分支管理规范
latex入门
Django's simple user system (3)
npm install 无响应解决方案
构造回文的最小插入次数
JVM真香系列:轻松理解class文件到虚拟机(下)
Introduction to latex
CMS垃圾收集器
C / C + + learning diary: original code, inverse code and complement code
Infix expression to suffix expression
MongoDB数据库
The minimum insertion times of palindrome







