main()
{
void enterdata(int y[]);
int y;
int i=0;
int choice;
void searchdata(int x[]);
char paint [9];
char colours [9];
char search[9];
int colour_no;
int r;
int x=0;
void enterdata(int y[], int size){ int i; while(1){ printf("Enter choice: "); scanf("%d",&i); if(i<=5701||i>=5709) break; else{ printf("Re-enter choice\n"); switch (i){ case 5701: printf("Red\n:"); break; case 5202: //something happen break; //default: write it if you need }
}
} for(int j=0; j<size; j++){ scanf("%d",&y[j]); }
}
int main() { int y; //... char colours[9] ={'#','0','x','f','f','f','f','f','f'}; int x=0;
printf("Enter choice: "); scanf("%d",&y);
if(y>=5701||y<=5709) //you need to use "&&" instead "||" for [5701;5709] printf("Choice Available:%d\n",enterdata);
if(y<5701||y>5709) printf("Choice Not Available:%d\n",enterdata);
if(x!=-1) printf("Colour Found:%s",colours);
if(x==-1) printf("Colour Not Found:%s",colours); //... return 0;// programm end successfully
Comments