firsth.cpp
来自「这是一个四则运算的程序。可实现 任意两个数的四则运算。用 C++做的」· C++ 代码 · 共 26 行
CPP
26 行
#include"firstH.h"
void show()
{
cout<<"This is a project about +-*/"<<endl;
cout<<"please input a,b:"<<endl;
}
void Addition(float a,float b)
{
cout<<"a+b="<<a+b<<endl;
}
void Subtraction(float a,float b)
{
cout<<"a-b="<<a-b<<endl;
}
void Multiplication(float a,float b)
{
cout<<"a*b="<<a*b<<endl;
}
void Divition(float a,float b)
{
if(b!=0)
cout<<"a/b="<<a/b<<endl;
else
cout<<"error!"<<endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?