Ejemplo n.º 1
0
int main()
{       
	int choice=0,i;
	screentitle();
	do{
		printf("\n\t~~MENU~~\n [1] Add A New Book\n [2] Display Books Information\n [3] Display members Information\n [4] Search a book \n [5] Add A New Member\n [6] Exit the program\n\n\t Enter your choice <1-6>: ");
	scanf("%i",&choice);
	switch (choice)
	{   
        	case 1:Addbook();
			break;
        	case 2:Displaybook();
			break;
		case 3:Displaymem();
			break;
		case 4:Search();
                	break;
        	case 5:Addmembr();
                	break;
        	case 6:Exit();
                	break;
		default:
            		printf(" ! Invalid Input...\n");
	}
	}while(choice!=6);
	 return (0);
}
Ejemplo n.º 2
0
int main(int argc, char *argv[]) {
    screen(width,height);
    screentitle("PlayWave");
    settextfont("FreeMono.ttf",45);
    setonkey(keyfnc);
    run_async(sndPlayer,NULL);
    while(1) {
        fillrect(0,0,width,height,0);
        drawtext( "Press Something",0 ,0,0xf0ffff00);
        if(keystate==1){
            inchz();
        }
        else if(keystate == -1){
            dechz();
        }
        generateWave();
        drawwav();
        drawtext(keymsg_buf ,0,45,0xf0ffff00);        
        flushscreen();
    }
    return 0;
}