当前位置:网站首页>The function keeps the value of variable H to two decimal places and rounds the third digit
The function keeps the value of variable H to two decimal places and rounds the third digit
2022-06-26 16:44:00 【Muzi..】
#include<stdio.h>
#include<stdlib.h>
double fun(double h);
int main()
{
float a;
printf("enter a:");
scanf("%f",&a);
printf("the original data is:");
printf("%f\n\n",a);
printf("the result:%f\n",fun(a));
}
double fun(double h)
{
int temp;
temp=(int)(h*1000+5)/10;
return(double)temp/100;
}
边栏推荐
- Hyperf框架使用阿里云OSS上传失败
- No manual prior is required! HKU & Tongji & lunarai & Kuangshi proposed self supervised visual representation learning based on semantic grouping, which significantly improved the tasks of target dete
- 当一个程序员一天被打扰 10 次,后果很惊人!
- pybullet机器人仿真环境搭建 5.机器人位姿可视化
- Niuke programming problem -- dynamic programming of must brush 101 (a thorough understanding of dynamic programming)
- IAR engineering adapts gd32 chip
- Mono 的一些实例方法
- Niuke Xiaobai monthly race 50
- 探讨:下一代稳定币
- Day10 daily 3 questions (3): String Matching in array
猜你喜欢

Science | 红树林中发现的巨型细菌挑战传统无核膜观念

基于Kubebuilder开发Operator(入门使用)

C语言所有知识点小结

JUnit unit test

基于STM32+华为云IOT设计的云平台监控系统

NFT 交易市场社区所有化势不可挡

# 补齐短板-开源IM项目OpenIM关于初始化/登录/好友接口文档介绍
![[from database deletion to running] JDBC conclusion (finish the series in one day!! run as soon as you finish learning!)](/img/75/2fb1a4e6215e404df34849e9e4f21a.png)
[from database deletion to running] JDBC conclusion (finish the series in one day!! run as soon as you finish learning!)
Scala 基础 (二):变量和数据类型

架构实战营毕业设计
随机推荐
Experience in hierarchical debugging of boards and cards
对话长安马自达高层,全新产品将在Q4发布,空间与智能领跑日系
我把它当副业月入3万多,新手月入过万的干货分享!
[graduation season] a word for graduates: the sky is high enough for birds to fly, and the sea is wide enough for fish to leap
Detailed explanation of cookies and sessions
Arduino uno + DS1302 simple time acquisition and serial port printing
LeetCode Algorithm 24. Exchange the nodes in the linked list in pairs
Kept to implement redis autofailover (redisha)
TCP congestion control details | 1 summary
Dialogue with the senior management of Chang'an Mazda, new products will be released in Q4, and space and intelligence will lead the Japanese system
100+ data science interview questions and answers Summary - basic knowledge and data analysis
Scala Foundation (2): variables et types de données
Summary of all knowledge points of C language
Arduino UNO + DS1302简单获取时间并串口打印
[understanding of opportunity -31]: Guiguzi - Daoyu [x ī] Crisis is the coexistence of danger and opportunity
Qt 5.9.8 安装教程
Learn about common functional interfaces
STM32F103C8T6实现呼吸灯代码
【MATLAB项目实战】基于卷积神经网络与双向长短时(CNN-LSTM)融合的锂离子电池剩余使用寿命预测
proxy