#include<stdio.h>
int main(int argc,char *argv[])
{
int i;
if(argc==2)
{
if(atoi(argv[1])%2==0)
printf("\nEVEN NO.\n");
else
printf("\nODD NO.\n");
}
else if(argc>2)
printf("\nEnter only one Integer..!!!\n");
else
printf("\nEnter one Integer.!!!\n");
return 0;
int main(int argc,char *argv[])
{
int i;
if(argc==2)
{
if(atoi(argv[1])%2==0)
printf("\nEVEN NO.\n");
else
printf("\nODD NO.\n");
}
else if(argc>2)
printf("\nEnter only one Integer..!!!\n");
else
printf("\nEnter one Integer.!!!\n");
return 0;
}
4 Comments
it has errors
ReplyDeleteerror: expected declaration or statement at end of input
ReplyDeletereturn 0;
The end curly brace is in black color ,so you may have forgot to write that brace '}' while running the program,that why its showing the error.
DeleteI have changed the '}' color which was earlier black, due to which it was not visible..otherwise Code is Ok:-)
Delete