#include < stdio.h >
#include < conio.h >
main(){
int w;
enum weekday{mon,tue,wed,thu,fri,sat,sun};
enum weekday week_st, week_end;
clrscr();
printf("enter 0 for monday\n");
scanf("%d",&w);
week_st=w; /* if w is equal to 0 then only the condition is true*/
week_end=sun;
if(week_st==mon && week_end==sun)
   printf("beginning and end of the week\n");
else
      printf("not valid\n");
  getch();
}


<< Back

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus




Footer1