This piece of code is giving me this error: expected initializer before 'void' void num(int a) plz explain
#include<iostream>
using namespace std;
int main()
void num(int a)
{
if(a%2==0)
cout<<"EVEN";
else
cout<<"ODD";
}
{
int n;
cout<<"Enter a number: ";
cin>>n;
cout<<"The numher is : "<<num(n);
}
Aucun commentaire:
Enregistrer un commentaire