当前位置:网站首页>第五章
第五章
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
边栏推荐
猜你喜欢
SQL quick query
WordPress网站程序和数据库定时备份到七牛云图文教程
VirtualBox install centos7
【云服务】阿里云服务器ECS实例规格那么多,如何选型?最佳实践说明
Dynamic ReLU:微软推出提点神器,可能是最好的ReLU改进 | ECCV 2020
函数分类大pk!sigmoid和softmax,到底分别怎么用?
Summary: in October, more investment management strategies have come to the new overseas defi project!
构造回文的最小插入次数
Iptables from introduction to mastery
npm install 无响应解决方案
随机推荐
Come and have a look! What is the relationship between AQS and countdownlatch?
Looking for a small immutable dictionary with better performance
Summary of interface test case ideas
Using GaN based oversampling technique to improve the accuracy of model for mortality prediction of unbalanced covid-19
学会了volatile,你变心了,我看到了
构造回文的最小插入次数
experiment
为什么需要使用API管理平台
Flink series (0) -- Preparation (basic stream processing)
C/C++知识分享: 函数指针与指针函数,看完这篇你还能不懂?
Simulink中封装子系统
在Python中创建文字云或标签云
C / C + + knowledge sharing: function pointer and pointer function, can you understand after reading this article?
An online accident caused by improper use of thread pool
LeetCode 45 跳跃游戏II
[cloud service] there are so many ECS instances on alicloud server, how to select the type? Best practice note
Django's simple user system (3)
Infix expression to suffix expression
Opencv solves the problem of ippicv download failure_ 2019_ lnx_ intel64_ general_ 20180723.tgz offline Download
MongoDB增删改查操作