当前位置:网站首页>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;
}
边栏推荐
- Day10 daily 3 questions (1): sum gradually to get the minimum value of positive numbers
- MS|谢黎炜组发现混合益生菌制剂及其代谢产物可缓解结肠炎
- Find out the maximum value of each column element of NxN matrix and store it in the one-dimensional array indicated by formal parameter B in order
- Count the number of each vowel letter in the string
- 基于Kubebuilder开发Operator(入门使用)
- Count the number of words in a line of string and take it as the return value of the function
- [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
- Calculate a=1, a2=1/1=a1
- Gui+sqlserver examination system
- 【MATLAB项目实战】基于卷积神经网络与双向长短时(CNN-LSTM)融合的锂离子电池剩余使用寿命预测
猜你喜欢

Arduino uno + DS1302 simple time acquisition and serial port printing

国内首款开源 MySQL HTAP 数据库即将发布,三大看点提前告知

100+数据科学面试问题和答案总结 - 基础知识和数据分析

数字藏品与NFT到底有何区别

Natural language inference with attention and fine tuning Bert pytorch
![[机缘参悟-31]:鬼谷子-抵巇[xī]篇-危机是危险与机会并存](/img/e8/9c5f1658a252c3c80503b5021917f6.jpg)
[机缘参悟-31]:鬼谷子-抵巇[xī]篇-危机是危险与机会并存

Screenshot of the answers to C language exercises
![[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!)

【从删库到跑路】JDBC 完结篇(一天学完系列!!学完赶紧跑!)

I regard it as a dry product with a monthly income of more than 30000 yuan for sidelines and more than 10000 yuan for novices!
随机推荐
108. 简易聊天室11:实现客户端群聊
Day10 daily 3 questions (3): String Matching in array
Cuckoo filter for Chang'an chain transaction
Kept to implement redis autofailover (redisha)
[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
电路中缓存的几种形式
Swap two numbers
网页课程设计大作业——华山旅游网
【小5聊】毕业8年,一直在追梦的路上
当一个程序员一天被打扰 10 次,后果很惊人!
JS tutorial using electron JS build native desktop application ping pong game
Find out the maximum value of each column element of NxN matrix and store it in the one-dimensional array indicated by formal parameter B in order
Detailed explanation of cookies and sessions
TCP拥塞控制详解 | 1. 概述
建立自己的网站(16)
Count the number of words in a line of string and take it as the return value of the function
Arduino uno + DS1302 simple time acquisition and serial port printing
Calculate a=1, a2=1/1=a1
Solution for filtering by special string of microservice
知道这几个命令让你掌握Shell自带工具