Here is my code, its in C++ language and I have int main(){}
as I do in all of my programs and I'm still getting this error message. Help?
#include<iostream>
#include <ctime>
using namespace std;
int main(){
int fibo(int n)
{
if (n == 0)
return 0;
else if (n == 1)
return 1;
else
return fibo(n - 1) + fibo(n - 2);
}
void main()
{
clock_t t;
t = clock();
int n, i;
cout << "Enter the total number of elements: ";
cin >> n;
cout << "\nThe Fibonacci series is:\n";
for (i = 0; i < n; i++)
{
cout << fibo(i) << " ";
}
t = clock() - t;
cout << "\nThe time required is:";
cout << t / CLOCKS_PER_SEC;
getch();
}
}