Need help on first on first calculator
Here's the code:
Code:
#include "stdafx.h"
#include "iostream"
using namespace std;
main()
{
double a;
cin>>a;
if(a==0)
cout<<"This number is Zero";
else if(a<0)
cout<<"This number is negative";
else
cout<<"This number is positive";
}
And when i build it i get this error:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
I need help asap pls..
It is a homework and i don't get whats wrong
You just forgot to set the type of the main function, replace "main()" with "int main()".