当前位置:网站首页>第五章
第五章
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
边栏推荐
- 数组初相识
- Dynamic relu: Microsoft's refreshing device may be the best relu improvement | ECCV 2020
- 11 important operations of Python list
- Opencv solves the problem of ippicv download failure_ 2019_ lnx_ intel64_ general_ 20180723.tgz offline Download
- An online accident caused by improper use of thread pool
- Creating a text cloud or label cloud in Python
- c++ opencv4.3 sift匹配
- Suffix expression to infix expression
- Express framework
- LeetCode 45 跳跃游戏II
猜你喜欢
随机推荐
Dynamic relu: Microsoft's refreshing device may be the best relu improvement | ECCV 2020
趣文分享:C 语言和 C++、C# 的区别在什么地方?
Express框架
Django之简易用户系统(3)
How much disk IO does a byte of read file actually take place?
学会了volatile,你变心了,我看到了
在Python中创建文字云或标签云
Simple process of reading pictures by QT program developed by Python
Chapter 2 programming exercises
Exercise 5
Countdownlatch explodes instantly! Based on AQS, why can cyclicbarrier be so popular?
go语言参数传递到底是传值还是传引用?
IT industry salary has been far ahead! Ten years later, is the programmer still a high paying profession?
PHP generates unique strings
经典动态规划:最长公共子序列
[elastic search technology sharing] - ten pictures to show you the principle of ES! Understand why to say: ES is quasi real time!
第一部分——第2章指针操作
AI香水来了,你会买吗?
Looking for a small immutable dictionary with better performance
Your random IO hard disk