Calculator of multiplication by function | Multiply two values by using function



// This is written by "Syed Ali Haider"
// Student of Havjery University
// Don't remove these line for legal use
// Upload on Let's programming by (CEO)
// For contact
// key_to_programming@yahoo.com
# include <iostream>
using namespace std;

int function(int i, int j) // function header
{
       int result;
       result= i*j;
       return result; // the return variable of the function
}

void main ()
{

       cout<<"Enter the value for i: ";
       int a;
       cin>>a;
       cout<<"Enter the value for j:";
       int b;
       cin>>b;
      
       int result; // a variable is declare for the funcion return value

       result=function(a,b); // assign value to the function


       cout<<"Result is: "<<result<<endl; // print the result
}
// This is written by "Syed Ali Haider"
// Student of Havjery University
// Don't remove these line for legal use
// Upload on Let's programming by (CEO)
// For contact
// key_to_programming@yahoo.com


Comments

Popular posts from this blog

Umbrella activities in Software Engineering

Operating System | Best Definition of Opetating System