当前位置:网站首页>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;
}
边栏推荐
- 数字藏品与NFT到底有何区别
- 对NFT市场前景的7个看法
- 用Attention和微调BERT进行自然语言推断-PyTorch
- 100+数据科学面试问题和答案总结 - 基础知识和数据分析
- Greenplum数据库故障分析——semop(id=2000421076,num=11) failed: invalid argument
- 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
- 108. simple chat room 11: realize client group chat
- IAR engineering adapts gd32 chip
- How to separate jar packages and resource files according to packaging?
- 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
猜你喜欢

Teach you to learn dapr - 1 The era of net developers

用Attention和微调BERT进行自然语言推断-PyTorch

Qt 5.9.8 安装教程

100+ data science interview questions and answers Summary - basic knowledge and data analysis

Kubernetes essential tools: 2021

Research on natural transition dubbing processing scheme based on MATLAB

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

Niuke programming problem -- dynamic programming of must brush 101 (a thorough understanding of dynamic programming)

Science | giant bacteria found in mangroves challenge the traditional concept of nuclear free membrane
![[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](/img/b6/21e51fa7f79d4a4b950f061703f0fb.png)
[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
随机推荐
In a bad mood, I just write code like this
[learn FPGA programming from scratch -46]: Vision - development and technological progress of integrated circuits
Develop operator based on kubebuilder (for getting started)
Teach you to learn dapr - 8 binding
Convert the decimal positive integer m into the number in the forward K (2 < =k < =9) system and output it in bits
# 补齐短板-开源IM项目OpenIM关于初始化/登录/好友接口文档介绍
day10每日3题(2):统计最大组的数目
探讨:下一代稳定币
TCP congestion control details | 1 summary
Binary array command of redis
Find all primes less than or equal to Lim, store them in AA array, and return the number of primes
How to implement interface current limiting?
Swap two numbers
Niuke programming problem -- dynamic programming of must brush 101 (a thorough understanding of dynamic programming)
Detailed explanation of cookies and sessions
Redis order sorting command
Count the number of each vowel letter in the string
Day10 daily 3 questions (3): String Matching in array
Junit单元测试
[Li Kou brush question] monotone stack: 84 The largest rectangle in the histogram