Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- double addition (double x, double y){
- double z = x + y;
- return z;
- }
- double subtraction (double x, double y){
- double z = x - y;
- return z;
- }
- double square (double x){
- double z = x * x;
- return z;
- }
- double cube (double x){
- double z = x * x * x;
- return z;
- }
- double squareroot (double x){
- double z = sqrt (x);
- return z;
- }
- double squarecube (double x){
- double z = pow(x, 1.0/3.0);
- return z;
- }
- int main (){
- cout << "the first answer is: " << addition (4, 45.45) << endl;
- cout << "the second answer is: " << subtraction (4, 45.45) << endl;
- cout << "the third answer is: " << square (45.45) << endl;
- cout << "the forth answer is: " << cube (45.45) << endl;
- cout << "the fifth answer is: " << squareroot (45.45) << endl;
- cout << "the sixth answer is: " << squarecube (45.45);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement