//************************************** // Name: Sum of Three Numbers Using C++ // Description:A simple program that I wrote using C++ as my programming language that will compute the sum of three numbers using functions and structure. The code is very simple and easy to understand. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. My mobile number here in the Philippines is 09173084360. // By: Jake R. Pomperada // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //************************************** #include <iostream> using namespace std; struct num { int value[3]; }; int addition(num a) { return(a.value[0] + a.value[1] + a.value[2]); } main() { num b; cout << "\t Sum of Three Numbers "; cout << "\n\n"; cout << "Enter three numbers : "; cin >> b.value[0] >> b.value[1] >> b.value[2]; cout << "\n\n"; cout << "The sum is " <<addition(b); cout << "\n\n"; system("pause"); }