当前位置:网站首页>实型数运算
实型数运算
2022-06-28 19:51:00 【Zaltana】
编写一个简单程序,用户输入2个实型数据存储在变量中,并输出他们的乘积与商(不考虑除数为0的情况)
例如
输入:3.1 4.2
输出:3.100000*4.200000=13.020000
3.100000/4.200000=0.738095
#include<bits/stdc++.h>
using namespace std;
int main( )
{
double a,b;
scanf("%lf",&a);
scanf("%lf",&b);
printf("%0.6lf*%0.6f=%0.6lf\n",a,b,a*b) ;
printf("%0.6lf/%0.6f=%0.6lf",a,b,a/b) ;
return 0;
}边栏推荐
- Database learning notes (sql04)
- h5向日葵作业
- Echart: category text position adjustment of horizontal histogram
- Software supply chain security risk guide for enterprise digitalization and it executives
- Quaternion quaternion and Euler angle transformation in ROS
- How does redis implement inventory deduction? How to prevent oversold?
- easypoi
- 2342
- echart:横向柱状图的类目文字位置调整
- Troubleshooting of pyinstaller failed to pack pikepdf
猜你喜欢

Intelligent computing system 1 environment construction

Software supply chain security risk guide for enterprise digitalization and it executives

Parallax JS special effect JS carousel map plug-in

颜色渐变的FontAwesome图标

Variable autoencoders (vaes)

【Go语言刷题篇】Go从0到入门5:Map综合复习、条件语句、循环语句练习

Number theory -- detailed proof of Euler function, sieve method for Euler function, Euler theorem and Fermat theorem

5g NR MBS architecture introduction

Jenkins pipeline's handling of job parameters

Severity code description project file line suppress status error lnk2038 detected a mismatch of "runtimelibrary": the value "md\u dynamicrelease" does not match the value "mdd\u dynamicde"
随机推荐
Figure introduction to neural networks (GNN, GCN)
C#应用程序界面开发基础——窗体控制
Double contextual relationship network for polyp segmentation
Bayesian Reference problem, mCMC and variational reference
How does redis implement inventory deduction? How to prevent oversold?
Kaggle肠胃道图像分割比赛baseline
阿里开源(EasyExcel)
2022年4月10日--使用C#迈出第一步--使用C#从.NET类库调用方法(没看懂)
Analysis of all knowledge points of TCP protocol in network planning
[324. swing sequence II]
Autumn recruitment experience sharing | how to prepare for bank interview
Priority problem when local variables and global variables in C language have the same name (when local variables and global variables exist at the same time, local variables are preferred to be refer
Why is it not enough to declare the structure alias when using the structure variable of other files in C language, and the proper name must be used? (cannot add struct when using alias)
SQL server2019 create a new SQL server authentication user name and log in
QSP读取标签配置错误问题
如何做好客户成功的底层设计|ToB大师课
裁员真能拯救中国互联网?
社招两年半10个公司28轮面试面经
bluecmsv1.6代码审计
echart:横向柱状图的类目文字位置调整