#include<stdio.h>
#include<stdlib.h>
int main()
{
enum control {threshold=-1,off,on} ;
enum control button;
printf("enter the control:");
scanf("%d",&button);
switch(button)
{
case threshold:
printf("threshold");
break;
case on:
printf("on");
break;
case off:
printf("off");
break;
default:
printf("out off scope");
}
getchar();
return 0;
}
#include<stdlib.h>
int main()
{
enum control {threshold=-1,off,on} ;
enum control button;
printf("enter the control:");
scanf("%d",&button);
switch(button)
{
case threshold:
printf("threshold");
break;
case on:
printf("on");
break;
case off:
printf("off");
break;
default:
printf("out off scope");
}
getchar();
return 0;
}
No comments:
Post a Comment