#include<iostream>
usingnamespace std;
int prime( int m , int n ) ;
int main()
{
int m, n, p, i, isPrime = true ;
cout << "Enter two numbers" << endl;
cin >> m >> n;
int prime(int m,int n);
if( n > m )
{
for( p = m ; p <= n ; p ++ )
{
isPrime = true;
for( i = 2 ; i < p ; i++ )
{
if( p % i == 0 )
{
isPrime = false;
}
}
if(isPrime)
{
cout << prime(int m,int n) << endl;
}
}
}
}
2)line 14 = line 4 : duplicate declaration of function "prime( int , int )"
3)line 30: call function "prime( int m , int n )": function call incorrectly;
It doesn't output because it won't even compile.
As ar2007 pointed out in #3, you don't specify types when making a function call.
And #4, you have a function declaration for prime(), but you've never defined prime(). This is going to cause a linker error (once you fix the compile errors).
what do you do?
1) Fix the compile errors.
2) Define the function prime() so you don't get an undefined symbol at link time.