SlideShare una empresa de Scribd logo
1 de 14
#include <stdio.h>//built i function 
#include<string.h>//built in function 
#include<stdlib.h> 
#include<time.h>//to call time 
#include<windows.h>//to call sleep 
void first (void);// void function prototype 
char second (void);//non function prototype 
void fourth (void);//void function prototype 
int choice (void);//non-void funtion prototype 
char functionFood(void);//function prototype 
char functionAnimal(void);//function prototype 
char functionSport(void);//function prototype 
void menang(void);//function prototype 
void kalah(void);//function prototype 
char replay(void);//function prototype 
void bye (void);//function prototype 
int main() 
{ 
char b,c,d,f; 
first(); 
b=second();
if (b=='p'||b=='P') 
{ 
do{ 
fourth(); 
c=choice(); 
if (c==1) 
{ 
d=functionFood(); 
if (d=='m') 
{ 
menang(); 
}else 
kalah(); 
// f=replay();} 
} 
else if (c==2) 
{
d=functionAnimal(); 
if (d=='m') 
{ 
menang();} 
else 
{ 
kalah();} 
} 
else if (c==3) 
{ 
d=functionSport(); 
if (d=='m') 
{ 
menang();} 
else 
{ 
kalah();} 
} 
f=replay(); 
}while(f=='r'||f=='R'); 
bye(); 
} 
else if(b=='q'||b=='Q')
{ 
bye (); 
} 
return 0; 
} 
void first(void) 
{ 
printf("nnnnttttWELCOME TO nnnn"); 
Sleep(250); 
printf(" h h a n n gggggg m m a n nn"); 
Sleep(250); 
printf(" h h a a nn n g g mm mm a a nn nn") ; 
Sleep(250); 
printf(" h h a a n n n g m m m m a a n n nn"); 
Sleep(250); 
printf(" hhhhhh aaaaaaa n n n g ggggg m m m m aaaaaaaa n n nn"); 
Sleep(250); 
printf(" h h a a n n n g g m m m m a a n n nn"); 
Sleep(250); 
printf(" h h a a n nn g g m m m m a a n nnn");
Sleep(250); 
printf(" h h a a n n ggggg m m m a a n n nnnttttGAMESnnn"); 
Sleep(250); 
printf("tt=================================================nnnn"); 
} 
char second (void) 
{ 
char play; 
printf("PRESS P TO PLAY OR PRESS Q TO EXIT:"); 
scanf(" %c",&play); 
return play; 
} 
void fourth (void) 
{ 
char name[30]; 
printf("tttnHOW TO PLAY???nnnINSTRUCTIONS-YOU NEED TO ENTER ANY KEY TO GUESS 
THE WORD..nYOU HAVE 10 WORDS TRIAL..GOODLUCK "); 
printf("nnnnENTER YOUR NAME:"); 
scanf(" %s", name);
system("cls"); 
} 
int choice (void) 
{ 
int choice; 
printf(" ENTER YOUR CHOICE n"); 
printf(" 1)food 2)animal 3)sport nnn"); 
Sleep (300); 
printf("tttENTER THE DIGIT ABOVE:"); 
scanf(" %d",&choice); 
system("cls"); 
return choice; 
} 
char functionFood(void) 
{ 
char words[6][10] = {"nasilemak","currypuff","nancheese","milkshake","pakapau","paukacang"}; 
char temp[10] = "__________"; 
int count=10,random; 
char current[10];
char character,s; 
int t,q,flag; 
srand(time(NULL)); 
random=0+rand()%6; 
printf("Enter your guess of food..... "); 
strcpy(temp,"_________"); 
for(q=0;q<strlen(words[random]);q++) 
{ 
current[q]=words[random][q]; 
} 
do 
{ 
printf("nnn POINT(s) LEFT:<< %d >>", count); 
puts(temp); 
character=getch(); 
printf("nLetter entered ===> %c", character); 
for(t=0;t<strlen(current);t++) 
{ 
if(character==current[t]) 
temp[t]=character; 
flag=0; 
}
if(flag<2)count--; 
if(count<1) 
{ 
s='k'; 
return s; 
} 
}while(strcmp(temp,words[random])); 
s='m';//printf("nYou did it. Keep playing 'till you die !!!nPress any key to advance..."); 
return s; 
} 
char functionAnimal(void) 
{ 
char words[6][9] = {"giraffe","lion","tiger","elephant","mustang","stallion"}; 
char temp[9] = "_________"; 
int count=10,random; 
char current[9]; 
char character,s; 
int t,q,flag; 
srand(time(NULL)); 
random=0+rand()%6;
strcpy(temp,"________"); 
for(q=0;q<strlen(words[random]);q++) 
{ 
current[q]=words[random][q]; 
} 
do 
{ 
printf("nnn POINT(s) LEFT:<< %d >> ",count); 
puts(temp); 
character=getch(); 
printf(" Letter entered ===> %c", character); 
for(t=0;t<strlen(current);t++) 
{ 
if(character==current[t]) 
temp[t]=character; 
flag=0; 
} 
if(flag<2)count--; 
if(count<1) 
{
s='k'; 
return s; 
} 
}while(strcmp(temp,words[random])); 
s='m'; 
return s; 
} 
char functionSport(void) 
{ 
char words[6][9] = {"running","jogging","skating","sleeping","walking","swimming"}; 
char temp[9] = "_________"; 
int count=10,random; 
char current[9]; 
char character,s; 
int t,q,flag; 
srand(time(NULL)); 
random=0+rand()%6;
strcpy(temp,"________"); 
for(q=0;q<strlen(words[random]);q++) 
{ 
current[q]=words[random][q]; 
} 
do 
{ 
printf("nnn POINT(s) LEFT:<< %d >> ",count); 
puts(temp); 
character=getch(); 
printf(" Letter entered ===> %c", character); 
for(t=0;t<strlen(current);t++) 
{ 
if(character==current[t]) 
temp[t]=character; 
flag=0; 
} 
if(flag<2)count--; 
if(count<1) 
{ 
s='k';
return s; 
} 
}while(strcmp(temp,words[random])); 
s='m'; 
return s; 
} 
void menang() 
{ 
system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 
0B");Sleep(200);system("color 02");Sleep(200);system("color 0B");Sleep(200);system("color 
02");Sleep(200);system("color 0B"); 
system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 
0B");Sleep(200);system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 0B"); 
//Sleep(1000); 
printf("ttCONGRATULATION! YOU HAVE GUESS THE CORRECT ANSWERnnn "); 
return ; 
} 
void kalah(void) 
{ 
system("cls"); 
puts( "nttt ___" ); 
puts( " ttt| |" );
puts( " ttt| O" ); 
puts( " ttt| /|" ); 
puts( " ttt| |" ); 
puts( " ttt| / " ); 
puts( " ttt|" ); 
puts( "ttt---" ); 
system("color 0B"); 
Sleep(1000);system("color 5B");Sleep(200);system("color 0B");Sleep(200);system("color 
5B");Sleep(300);system("color 0B");Sleep(300);system("color 5B");Sleep(300) ;system("color 
0B");Sleep(300); 
printf("nnntt"); 
printf("H");Sleep(100);printf("A");Sleep(100);printf("H");Sleep(100);printf("A");Sleep(100);printf( 
"!");Sleep(100);printf("!");Sleep(100);printf(" 
L");Sleep(100);printf("O");Sleep(100);printf("S");Sleep(100);printf("E");Sleep(100);printf("R");Sleep(100); 
printf("!");Sleep(100);printf("!");Sleep(100);printf("!");Sleep(100);printf(" P");Sleep(100);printf("L"); 
Sleep(100);Sleep(100);printf("E");Sleep(100);printf("A");Sleep(100);printf("S");Sleep(100);printf( 
"E");Sleep(100);printf(" T");Sleep(100);printf("R");Sleep(100);printf("Y");Sleep(100);printf(" 
A");Sleep(100);printf("G");Sleep(100);printf("A");Sleep(100); 
printf("I");Sleep(100);printf("N");Sleep(100);printf("!");Sleep(100);printf("!");Sleep(100);printf("! 
");printf(" 
H");Sleep(100);printf("A");Sleep(100);printf("H");Sleep(100);printf("A");printf("H");Sleep(100);printf("A") 
;Sleep(100);printf("H");Sleep(100);printf("A");Sleep(100);printf("!");Sleep(100);printf("!"); 
printf("nnn"); 
return ; 
} 
char replay(void) 
{
char replay; 
printf("tDO YOU WANT PLAY AGAIN??PRESS 'R' TO REPLAY OR 'Q' TO QUIT:"); 
scanf(" %c",&replay); 
return replay; 
} 
void bye (void) 
{ 
system("cls"); 
printf(" nnntttYOU HAVE REQUESTED TO EXIT..BYEnttttTHANK 
YOUnnn"); 
system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 
0B");Sleep(200);system("color 02");Sleep(200);system("color 0B"); 
}

Más contenido relacionado

La actualidad más candente

La actualidad más candente (14)

Types of Operators in C
Types of Operators in CTypes of Operators in C
Types of Operators in C
 
Car Rental System
Car Rental SystemCar Rental System
Car Rental System
 
Social messenger introduction
Social messenger introductionSocial messenger introduction
Social messenger introduction
 
SERIE "MARCO PRISCO"
SERIE "MARCO PRISCO"SERIE "MARCO PRISCO"
SERIE "MARCO PRISCO"
 
Abstraction and Encapsulation
Abstraction and EncapsulationAbstraction and Encapsulation
Abstraction and Encapsulation
 
Discrete fourier transform
Discrete fourier transformDiscrete fourier transform
Discrete fourier transform
 
Digital Filters Part 2
Digital Filters Part 2Digital Filters Part 2
Digital Filters Part 2
 
NFA & DFA
NFA & DFANFA & DFA
NFA & DFA
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Fundamentals of c language
Fundamentals of c languageFundamentals of c language
Fundamentals of c language
 
Ch3
Ch3Ch3
Ch3
 
C++ Function
C++ FunctionC++ Function
C++ Function
 
LISP: Input And Output
LISP: Input And OutputLISP: Input And Output
LISP: Input And Output
 
Prgramming paradigms
Prgramming paradigmsPrgramming paradigms
Prgramming paradigms
 

Destacado

First game using c language
First game using c languageFirst game using c language
First game using c languageSaurabh Khetan
 
C programming project by navin thapa
C programming project by navin thapaC programming project by navin thapa
C programming project by navin thapaNavinthp
 
The Game of Hangman, Decision Theory and Delivering Software - Redsnake Phill...
The Game of Hangman, Decision Theory and Delivering Software - Redsnake Phill...The Game of Hangman, Decision Theory and Delivering Software - Redsnake Phill...
The Game of Hangman, Decision Theory and Delivering Software - Redsnake Phill...Chris Conley
 
Interactive PowerPoint : Hangman
Interactive PowerPoint : HangmanInteractive PowerPoint : Hangman
Interactive PowerPoint : HangmanEvette Sagim
 
Library Management System Project in C
Library Management System Project in CLibrary Management System Project in C
Library Management System Project in Ccodewithc
 
scientific calculator using c
scientific calculator using cscientific calculator using c
scientific calculator using cAnuj Kumar
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in cUpendra Sengar
 
A simple snake game project
A simple snake game projectA simple snake game project
A simple snake game projectAmit Kumar
 
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) HandoutsCracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) HandoutsGayle McDowell
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGAbhishek Dwivedi
 
12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science ProjectAshwin Francis
 
CCP's Mishu System Tsai and Dean
CCP's Mishu System Tsai and DeanCCP's Mishu System Tsai and Dean
CCP's Mishu System Tsai and DeanSAINBAYAR Beejin
 
Chuanz product development process
Chuanz product development processChuanz product development process
Chuanz product development processgarykellmann
 

Destacado (20)

Hangman game
Hangman gameHangman game
Hangman game
 
First game using c language
First game using c languageFirst game using c language
First game using c language
 
C programming project by navin thapa
C programming project by navin thapaC programming project by navin thapa
C programming project by navin thapa
 
Hangman Program
Hangman ProgramHangman Program
Hangman Program
 
The Game of Hangman, Decision Theory and Delivering Software - Redsnake Phill...
The Game of Hangman, Decision Theory and Delivering Software - Redsnake Phill...The Game of Hangman, Decision Theory and Delivering Software - Redsnake Phill...
The Game of Hangman, Decision Theory and Delivering Software - Redsnake Phill...
 
Hangman: Design and Implementation
Hangman: Design and ImplementationHangman: Design and Implementation
Hangman: Design and Implementation
 
Interactive PowerPoint : Hangman
Interactive PowerPoint : HangmanInteractive PowerPoint : Hangman
Interactive PowerPoint : Hangman
 
Library Management System Project in C
Library Management System Project in CLibrary Management System Project in C
Library Management System Project in C
 
scientific calculator using c
scientific calculator using cscientific calculator using c
scientific calculator using c
 
Student record
Student recordStudent record
Student record
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in c
 
A simple snake game project
A simple snake game projectA simple snake game project
A simple snake game project
 
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) HandoutsCracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
 
Writing a gaming proposal
Writing a gaming proposalWriting a gaming proposal
Writing a gaming proposal
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science Project
 
Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...
Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...
Microsoft Technical Webinar: Doing more with MS Office, SharePoint and Visual...
 
CCP's Mishu System Tsai and Dean
CCP's Mishu System Tsai and DeanCCP's Mishu System Tsai and Dean
CCP's Mishu System Tsai and Dean
 
工作人生
工作人生工作人生
工作人生
 
Chuanz product development process
Chuanz product development processChuanz product development process
Chuanz product development process
 

Similar a Hangman Game Programming in C (coding) (20)

[SI] Ada Lovelace Day 2014 - Tampon Run
[SI] Ada Lovelace Day 2014  - Tampon Run[SI] Ada Lovelace Day 2014  - Tampon Run
[SI] Ada Lovelace Day 2014 - Tampon Run
 
VTU Data Structures Lab Manual
VTU Data Structures Lab ManualVTU Data Structures Lab Manual
VTU Data Structures Lab Manual
 
C lab manaual
C lab manaualC lab manaual
C lab manaual
 
[EN] Ada Lovelace Day 2014 - Tampon run
[EN] Ada Lovelace Day 2014  - Tampon run[EN] Ada Lovelace Day 2014  - Tampon run
[EN] Ada Lovelace Day 2014 - Tampon run
 
C programms
C programmsC programms
C programms
 
week-16x
week-16xweek-16x
week-16x
 
#include stdio.h#include stdlib.h#include string.h#inclu.pdf
#include stdio.h#include stdlib.h#include string.h#inclu.pdf#include stdio.h#include stdlib.h#include string.h#inclu.pdf
#include stdio.h#include stdlib.h#include string.h#inclu.pdf
 
Cpds lab
Cpds labCpds lab
Cpds lab
 
Lab Question
Lab QuestionLab Question
Lab Question
 
week-18x
week-18xweek-18x
week-18x
 
week-17x
week-17xweek-17x
week-17x
 
C basics
C basicsC basics
C basics
 
6 c control statements branching &amp; jumping
6 c control statements branching &amp; jumping6 c control statements branching &amp; jumping
6 c control statements branching &amp; jumping
 
ADA FILE
ADA FILEADA FILE
ADA FILE
 
Os lab upto_1st_mid
Os lab upto_1st_midOs lab upto_1st_mid
Os lab upto_1st_mid
 
Os lab upto 1st mid
Os lab upto 1st midOs lab upto 1st mid
Os lab upto 1st mid
 
Os lab 1st mid
Os lab 1st midOs lab 1st mid
Os lab 1st mid
 
week-6x
week-6xweek-6x
week-6x
 
Function & Recursion in C
Function & Recursion in CFunction & Recursion in C
Function & Recursion in C
 
String Manipulation Function and Header File Functions
String Manipulation Function and Header File FunctionsString Manipulation Function and Header File Functions
String Manipulation Function and Header File Functions
 

Hangman Game Programming in C (coding)

  • 1. #include <stdio.h>//built i function #include<string.h>//built in function #include<stdlib.h> #include<time.h>//to call time #include<windows.h>//to call sleep void first (void);// void function prototype char second (void);//non function prototype void fourth (void);//void function prototype int choice (void);//non-void funtion prototype char functionFood(void);//function prototype char functionAnimal(void);//function prototype char functionSport(void);//function prototype void menang(void);//function prototype void kalah(void);//function prototype char replay(void);//function prototype void bye (void);//function prototype int main() { char b,c,d,f; first(); b=second();
  • 2. if (b=='p'||b=='P') { do{ fourth(); c=choice(); if (c==1) { d=functionFood(); if (d=='m') { menang(); }else kalah(); // f=replay();} } else if (c==2) {
  • 3. d=functionAnimal(); if (d=='m') { menang();} else { kalah();} } else if (c==3) { d=functionSport(); if (d=='m') { menang();} else { kalah();} } f=replay(); }while(f=='r'||f=='R'); bye(); } else if(b=='q'||b=='Q')
  • 4. { bye (); } return 0; } void first(void) { printf("nnnnttttWELCOME TO nnnn"); Sleep(250); printf(" h h a n n gggggg m m a n nn"); Sleep(250); printf(" h h a a nn n g g mm mm a a nn nn") ; Sleep(250); printf(" h h a a n n n g m m m m a a n n nn"); Sleep(250); printf(" hhhhhh aaaaaaa n n n g ggggg m m m m aaaaaaaa n n nn"); Sleep(250); printf(" h h a a n n n g g m m m m a a n n nn"); Sleep(250); printf(" h h a a n nn g g m m m m a a n nnn");
  • 5. Sleep(250); printf(" h h a a n n ggggg m m m a a n n nnnttttGAMESnnn"); Sleep(250); printf("tt=================================================nnnn"); } char second (void) { char play; printf("PRESS P TO PLAY OR PRESS Q TO EXIT:"); scanf(" %c",&play); return play; } void fourth (void) { char name[30]; printf("tttnHOW TO PLAY???nnnINSTRUCTIONS-YOU NEED TO ENTER ANY KEY TO GUESS THE WORD..nYOU HAVE 10 WORDS TRIAL..GOODLUCK "); printf("nnnnENTER YOUR NAME:"); scanf(" %s", name);
  • 6. system("cls"); } int choice (void) { int choice; printf(" ENTER YOUR CHOICE n"); printf(" 1)food 2)animal 3)sport nnn"); Sleep (300); printf("tttENTER THE DIGIT ABOVE:"); scanf(" %d",&choice); system("cls"); return choice; } char functionFood(void) { char words[6][10] = {"nasilemak","currypuff","nancheese","milkshake","pakapau","paukacang"}; char temp[10] = "__________"; int count=10,random; char current[10];
  • 7. char character,s; int t,q,flag; srand(time(NULL)); random=0+rand()%6; printf("Enter your guess of food..... "); strcpy(temp,"_________"); for(q=0;q<strlen(words[random]);q++) { current[q]=words[random][q]; } do { printf("nnn POINT(s) LEFT:<< %d >>", count); puts(temp); character=getch(); printf("nLetter entered ===> %c", character); for(t=0;t<strlen(current);t++) { if(character==current[t]) temp[t]=character; flag=0; }
  • 8. if(flag<2)count--; if(count<1) { s='k'; return s; } }while(strcmp(temp,words[random])); s='m';//printf("nYou did it. Keep playing 'till you die !!!nPress any key to advance..."); return s; } char functionAnimal(void) { char words[6][9] = {"giraffe","lion","tiger","elephant","mustang","stallion"}; char temp[9] = "_________"; int count=10,random; char current[9]; char character,s; int t,q,flag; srand(time(NULL)); random=0+rand()%6;
  • 9. strcpy(temp,"________"); for(q=0;q<strlen(words[random]);q++) { current[q]=words[random][q]; } do { printf("nnn POINT(s) LEFT:<< %d >> ",count); puts(temp); character=getch(); printf(" Letter entered ===> %c", character); for(t=0;t<strlen(current);t++) { if(character==current[t]) temp[t]=character; flag=0; } if(flag<2)count--; if(count<1) {
  • 10. s='k'; return s; } }while(strcmp(temp,words[random])); s='m'; return s; } char functionSport(void) { char words[6][9] = {"running","jogging","skating","sleeping","walking","swimming"}; char temp[9] = "_________"; int count=10,random; char current[9]; char character,s; int t,q,flag; srand(time(NULL)); random=0+rand()%6;
  • 11. strcpy(temp,"________"); for(q=0;q<strlen(words[random]);q++) { current[q]=words[random][q]; } do { printf("nnn POINT(s) LEFT:<< %d >> ",count); puts(temp); character=getch(); printf(" Letter entered ===> %c", character); for(t=0;t<strlen(current);t++) { if(character==current[t]) temp[t]=character; flag=0; } if(flag<2)count--; if(count<1) { s='k';
  • 12. return s; } }while(strcmp(temp,words[random])); s='m'; return s; } void menang() { system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 0B"); system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 0B");Sleep(200);system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 0B"); //Sleep(1000); printf("ttCONGRATULATION! YOU HAVE GUESS THE CORRECT ANSWERnnn "); return ; } void kalah(void) { system("cls"); puts( "nttt ___" ); puts( " ttt| |" );
  • 13. puts( " ttt| O" ); puts( " ttt| /|" ); puts( " ttt| |" ); puts( " ttt| / " ); puts( " ttt|" ); puts( "ttt---" ); system("color 0B"); Sleep(1000);system("color 5B");Sleep(200);system("color 0B");Sleep(200);system("color 5B");Sleep(300);system("color 0B");Sleep(300);system("color 5B");Sleep(300) ;system("color 0B");Sleep(300); printf("nnntt"); printf("H");Sleep(100);printf("A");Sleep(100);printf("H");Sleep(100);printf("A");Sleep(100);printf( "!");Sleep(100);printf("!");Sleep(100);printf(" L");Sleep(100);printf("O");Sleep(100);printf("S");Sleep(100);printf("E");Sleep(100);printf("R");Sleep(100); printf("!");Sleep(100);printf("!");Sleep(100);printf("!");Sleep(100);printf(" P");Sleep(100);printf("L"); Sleep(100);Sleep(100);printf("E");Sleep(100);printf("A");Sleep(100);printf("S");Sleep(100);printf( "E");Sleep(100);printf(" T");Sleep(100);printf("R");Sleep(100);printf("Y");Sleep(100);printf(" A");Sleep(100);printf("G");Sleep(100);printf("A");Sleep(100); printf("I");Sleep(100);printf("N");Sleep(100);printf("!");Sleep(100);printf("!");Sleep(100);printf("! ");printf(" H");Sleep(100);printf("A");Sleep(100);printf("H");Sleep(100);printf("A");printf("H");Sleep(100);printf("A") ;Sleep(100);printf("H");Sleep(100);printf("A");Sleep(100);printf("!");Sleep(100);printf("!"); printf("nnn"); return ; } char replay(void) {
  • 14. char replay; printf("tDO YOU WANT PLAY AGAIN??PRESS 'R' TO REPLAY OR 'Q' TO QUIT:"); scanf(" %c",&replay); return replay; } void bye (void) { system("cls"); printf(" nnntttYOU HAVE REQUESTED TO EXIT..BYEnttttTHANK YOUnnn"); system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 0B");Sleep(200);system("color 02");Sleep(200);system("color 0B"); }