当前位置:网站首页>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;
}
边栏推荐
- Least squares system identification class II: recursive least squares
- Discover K8E: minimalist kubernetes distribution
- day10每日3题(1):逐步求和得到正数的最小值
- y=1/100*100+1/200*200+1/300*300+.....+ 1/m*m
- Knowing these commands allows you to master shell's own tools
- QT 5.9.8 installation tutorial
- [Li Kou brush questions] 11 Container holding the most water //42 Rain water connection
- Calculate the average of N numbers in the group indexed by the formal parameter x, move the data less than the average in the group indexed to the front of the array, and move the data greater than or
- Redis Guide (8): principle and implementation of Qianfan Jingfa distributed lock
- Niuke Xiaobai monthly race 50
猜你喜欢
Scala Basics (II): variables and data types

Junit单元测试

Natural language inference with attention and fine tuning Bert pytorch

1-12vmware adds SSH function

Structure the graduation project of actual combat camp

Cloud platform monitoring system based on stm32+ Huawei cloud IOT design

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

TCP congestion control details | 1 summary

【毕业季】致毕业生的一句话:天高任鸟飞,海阔凭鱼跃

Make up the weakness - Open Source im project openim about initialization / login / friend interface document introduction
随机推荐
[chat in 5] eight years after graduation, I have been pursuing my dream
网页课程设计大作业——华山旅游网
Least squares system identification class II: recursive least squares
并发编程整体脉络
基于STM32+华为云IOT设计的云平台监控系统
The student record consists of student number and academic performance. The data of n students have been stored in the a structure array to find out the student record with the lowest performance
Stm32f103c8t6 realize breathing lamp code
Arduino UNO + DS1302简单获取时间并串口打印
day10每日3题(2):统计最大组的数目
Several forms of buffer in circuit
STM32F103C8T6实现呼吸灯代码
Use the array to calculate the average of N numbers, and output the numbers greater than the average
Redis order sorting command
JS tutorial - printing stickers / labels using the electronjs desktop application
Cloud platform monitoring system based on stm32+ Huawei cloud IOT design
经典同步问题
对NFT市场前景的7个看法
Multiply the values of the upper triangular elements of the array by M
Scala Basics (II): variables and data types
MS|谢黎炜组发现混合益生菌制剂及其代谢产物可缓解结肠炎