C++ Function Without arguments and Without Return Value
//Type of Functions
//Function without arguments and without return value.
#include<iostream>
using namespace std;
void Addition();
int main()
{
Addition();
Addition();
Addition();
return 0;
}
void Addition()
{
int a, b, c;
cout<<"Enter 1st Number: ";
cin>>a;
cout<<"Enter 2nd Number: ";
cin>>b;
c=a+b;
cout<<"Addition result is:"<<c<<endl;
}
Comments
Post a Comment