当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- (O) Analysis of service manager (1) BinderInternal.getContextObject
- Introduction and application of swagger
- Introduction to latex
- 接口测试用例思路总结
- 经典动态规划:最长公共子序列
- 进程 线程 协程
- VirtualBox安装centos7
- Interesting article sharing: what is the difference between C language and C + +, C?
- Function classification big PK! How to use sigmoid and softmax respectively?
- Is parameter passing in go language transfer value or reference?
猜你喜欢
随机推荐
趣文分享:C 语言和 C++、C# 的区别在什么地方?
Mongodb add delete modify query operation
Package subsystem in Simulink
Problem solving templates for subsequence problems in dynamic programming
C / C + + learning diary: original code, inverse code and complement code
[random talk] JS related thread model sorting
IT industry salary has been far ahead! Ten years later, is the programmer still a high paying profession?
Classical dynamic programming: longest common subsequence
动态规划答疑篇
接口测试用例思路总结
Mycat搭建
Flink series (0) -- Preparation (basic stream processing)
Introduction to latex
学会了volatile,你变心了,我看到了
LeetCode 45 跳跃游戏II
How to deploy pytorch lightning model to production
CountDownLatch 瞬间炸裂!同基于 AQS,凭什么 CyclicBarrier 可以这么秀?
进程 线程 协程
latex入门
新手入坑指南:工作原因“重启”Deepin系统,发现真的香啊