C+ program, Functions of exponential, increment and addition

In this program we will find exponential, increment and addition through a function.

//Code starts

#include <iostream>

#include <conio.h>

using namespace std;

int expo(int a, int b);

int inc(int x);

int add(int a, int b);

int main()


int num,x;

cout<<“Enter Number for exponential”<<endl;


cout<<“Enter Power of exponential”<<endl;


cout<< “Exponential of ” <<num<<” is “<<expo(num,x)<<endl;

cout<<“Increament of “<<x<<” is “<<inc(x)<<endl;

cout << “Addition of “<<num<<” and “<<x<<” is “<< add(num,x);



int add(int a, int b)


int ans=0;


return ans;


int inc(int x)



return x;


int expo(int a, int b)


int ans=1;

for(int i=1;i<=b;i++)




return ans;


//Code Ends


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s