Sunday, December 12, 2021

User Defined Function in C++

 A simple program to demonstrate how to write user defined function in C++ programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.




Program Listing


#include <iostream>


int addition(int a, int b)

{

    return(a+b);

}


int product(int a, int b)

{

    return(a*b);

}


int main()

{

    std::cout <<"\n";

    std::cout << "\tUser Defined Function in C++\n\n";

    std::cout << "\tAddition Function :  " <<addition(2,4) << "\n";

    std::cout <<"\n";

    std::cout << "\tProduct Function  :  " <<product(5,5) << "\n";

    std::cout <<"\n";

}


No comments:

Post a Comment