Kodingan Bahasa C Enum

#include<stdio.h>
#include<conio.h>

enum boolean{
false, //0
true  //1
};

void main ( ) {
   //tipe data variabel
   enum boolean status;
 
   status = true ; //0
 
   if (status){
      printf("benar");
   }
   else {
      printf ("salah");
   }
 
getch ( );
return 0;
}
Comments
0 Comments

No comments: