Login ( RESET & SUBMIT Button)

 #include<stdio.h>

#include<conio.h>

//#include<graphics.h>

void main();

void wrong();

void main()

{

  char un[20];

  int c;



clrscr();

textbackground(11);

window(1,1,80,60);

clrscr();

 textbackground(16);

window(20,8,60,8);

clrscr();

textcolor(8);

cprintf("               RT LAVKUSH          - %c x",223);



textbackground(BLUE);

window(20,9,60,19);

clrscr();

label:

textcolor(WHITE);

gotoxy(11,3);

cprintf("User Name:");

scanf("%s",&un);

gotoxy(11,5);

cprintf("Password:");

scanf("%d");

gotoxy(11,8);

cprintf("1.RESET");

gotoxy(25,8);

cprintf("2.SUBMIT");

textcolor(YELLOW+BLINK);

gotoxy(13,10);

cprintf("Enter The Option:");

scanf("%d",&c);

switch(c)

{

case 1:

goto label;


case 2:

main();

default :

wrong();

}

getch();

}



void wrong()

{  clrscr();

   textbackground(WHITE);

   window(1,1,80,60);

   textcolor(RED+BLINK);

   cprintf("Wrong Choice Try Again!!");

}

Previous Post Next Post