hk20
21-10-2011, 08:59
چرا اين اشكال را از قسمتي از برنامم ميگيره؟
#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
int x;
cout<<"enter a number";
cin>>x;
if((x%2)==1);
{
cout<<"number";
}
else
{
cout<<"un number";
}
return 0;
}
misplaced else
#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
int x;
cout<<"enter a number";
cin>>x;
if((x%2)==1);
{
cout<<"number";
}
else
{
cout<<"un number";
}
return 0;
}
misplaced else