Calling functions from main() in c++

//main file funcall.cpp
#include<conio.h>
#include<iostream.h>
#include "log_x10.cpp"
#include"expo.cpp"
void main()
{
    logx10();
    expo();
}

//logx_10.cpp

# include<math.h>
# include<iostream.h>
void logx_10()
{
    int n=0;
    cout<<"Enter number;";
    cin>>n;
    cout<<"The log value is "<<log(n);
}
//expo.cpp
# include<math.h>
# include<iostream.h>
void expo()
{
    int n=0;
    cout<<"Enter number:";
    cin>>n;
    cout<<"\n Exponential value="<<exp(n);
}

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|