Monday, 15 June 2020

hangman game in c(JUST 24 LINES).

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int a,b,c;
char ch;
clrscr();
printf("\t\t\t\t Hang Man\n");
printf("\t\t Press any key to continue...\n");
scanf("%s");
printf("1.which is the best company for ac,fridge,tv and washing machine?\n");
printf("a.LG\n b.Samsung\n c.Sony\nd.Philips\n");
scanf("%s",&ch);
if(ch=='a')
{
printf("Safe\n");
}
else
{
printf("Hanged\n");
}
getch();
}

TYPE LIKE THIS:







THE FOLLOWING IS OUTPUT:



No comments:

Post a Comment

C Programming

What is DBMS in brief?

A Database Management System (DBMS) is a software suite designed to efficiently manage, organize, store, manipulate, and retrieve data. It a...