// Part1_functions.cpp : Defines the entry point for the console application. // //#include "stdafx.h" #include #include //#include "functions.h" using namespace std; //double add(double x, double y); //double add(double x, double y, double z); double add(double x, double y) //The function which takes two doubles and return double { return x + y; // operation and return inside the function } //double add(double x, double y, double z) //The function which takes two doubles and return double //{ // return x + y + z; // operation and return inside the function //} int main() { int a = 3; int b = 4; cout << "The summ is equal to " << add(a, b) << endl; //double d1 = add(1.2, 3.4); //double d2 = add(1.2, 3.4, 5.7); //cout << "The summ of 2 numbers is equal to " << d1 << endl; //cout << "The summ of 3 numbers is equal to " << d2 << endl; system("pause"); return 0; }