SlideShare a Scribd company logo
1 of 2
#include<iostream>
#include<stdlib.h>
#include<process.h>
#include<conio.h>
usingnamespace std;
void main()
{
while(1)
{
system("cls");
char choice;
cout<<"press 1 to play"<<endl;
cout<<"press 2 to exit"<<endl;
cin>>choice;
switch(choice)
{
case'1':
{
int wrong=0;
char x1[9]={"pakistan"};
char y1[9]={"--------"};
char z,a;
int i;
cout<<"press y to start the game"<<endl;
cin>>a;
while(a=='y')
{
cout<<"Enter the alphabets"<<endl;
for(i=0;i<=9;i++)
{
cin>>z;
for(int j=0;j<=8;j++)
{
if(z==x1[j])
y1[j]=z;
else
if(z!='p'&&z!='a'&&z!='k'&&z!='i'&&z!='s'&&z!='t'&&z!='a'&&z!='n')
{
cout<<"
wrong"<<endl;
wrong=wrong+1;
break;
}
else
;
}
if(wrong==3)
{
cout<<"you lost"<<endl;
break;
}
if(y1[0]==x1[0]&&y1[1]==x1[1]&&y1[2]==x1[2]&&y1[3]==x1[3]&&y1[4]==x1[4]
&&y1[5]==x1[5]&&y1[6]==x1[6]&&y1[7]==x1[7])
{
cout<<"you win"<<endl;
break;
}
cout<<y1<<endl;
}
break;
}
}
}
}
char x2[6]={"india"};
char y2[6]={"-----"};
char c;
int q;
cout<<"Enter the alphabets"<<endl;
for(q=0;q<7;q++)
{
cin>>c;
for(int r=0;r<=4;r++)
{
if(c==x2[r])
y2[r]=c;
else
if(c!='i'&&c!='n'&&c!='d'&&c!='i'&&c!='a')
{
cout<<"
wrong ans"<<endl;
break;
}
else
;
}
cout<<y2<<endl;
}
case'2':
{
exit(0);
break;
}
}

More Related Content

What's hot

The Ring programming language version 1.5.2 book - Part 50 of 181
The Ring programming language version 1.5.2 book - Part 50 of 181The Ring programming language version 1.5.2 book - Part 50 of 181
The Ring programming language version 1.5.2 book - Part 50 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 49 of 180
The Ring programming language version 1.5.1 book - Part 49 of 180The Ring programming language version 1.5.1 book - Part 49 of 180
The Ring programming language version 1.5.1 book - Part 49 of 180Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 57 of 202
The Ring programming language version 1.8 book - Part 57 of 202The Ring programming language version 1.8 book - Part 57 of 202
The Ring programming language version 1.8 book - Part 57 of 202Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 38 of 84
The Ring programming language version 1.2 book - Part 38 of 84The Ring programming language version 1.2 book - Part 38 of 84
The Ring programming language version 1.2 book - Part 38 of 84Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 52 of 202
The Ring programming language version 1.8 book - Part 52 of 202The Ring programming language version 1.8 book - Part 52 of 202
The Ring programming language version 1.8 book - Part 52 of 202Mahmoud Samir Fayed
 
Utility Classes Are Killing Us
Utility Classes Are Killing UsUtility Classes Are Killing Us
Utility Classes Are Killing UsYegor Bugayenko
 
The Ring programming language version 1.5.2 book - Part 51 of 181
The Ring programming language version 1.5.2 book - Part 51 of 181The Ring programming language version 1.5.2 book - Part 51 of 181
The Ring programming language version 1.5.2 book - Part 51 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 66 of 202
The Ring programming language version 1.8 book - Part 66 of 202The Ring programming language version 1.8 book - Part 66 of 202
The Ring programming language version 1.8 book - Part 66 of 202Mahmoud Samir Fayed
 
The Ring programming language version 1.5.4 book - Part 51 of 185
The Ring programming language version 1.5.4 book - Part 51 of 185The Ring programming language version 1.5.4 book - Part 51 of 185
The Ring programming language version 1.5.4 book - Part 51 of 185Mahmoud Samir Fayed
 
[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 runMaja Kraljič
 
The Ring programming language version 1.3 book - Part 40 of 88
The Ring programming language version 1.3 book - Part 40 of 88The Ring programming language version 1.3 book - Part 40 of 88
The Ring programming language version 1.3 book - Part 40 of 88Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 54 of 189
The Ring programming language version 1.6 book - Part 54 of 189The Ring programming language version 1.6 book - Part 54 of 189
The Ring programming language version 1.6 book - Part 54 of 189Mahmoud Samir Fayed
 
Asynchronous programming FTW!
Asynchronous programming FTW!Asynchronous programming FTW!
Asynchronous programming FTW!xSawyer
 
[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 RunMaja Kraljič
 
The Ring programming language version 1.5.3 book - Part 50 of 184
The Ring programming language version 1.5.3 book - Part 50 of 184The Ring programming language version 1.5.3 book - Part 50 of 184
The Ring programming language version 1.5.3 book - Part 50 of 184Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212Mahmoud Samir Fayed
 
Snake report ROHIT MALAV
Snake report ROHIT MALAVSnake report ROHIT MALAV
Snake report ROHIT MALAVRohit malav
 

What's hot (20)

The Ring programming language version 1.5.2 book - Part 50 of 181
The Ring programming language version 1.5.2 book - Part 50 of 181The Ring programming language version 1.5.2 book - Part 50 of 181
The Ring programming language version 1.5.2 book - Part 50 of 181
 
project3
project3project3
project3
 
201707 CSE110 Lecture 13
201707 CSE110 Lecture 13   201707 CSE110 Lecture 13
201707 CSE110 Lecture 13
 
The Ring programming language version 1.5.1 book - Part 49 of 180
The Ring programming language version 1.5.1 book - Part 49 of 180The Ring programming language version 1.5.1 book - Part 49 of 180
The Ring programming language version 1.5.1 book - Part 49 of 180
 
The Ring programming language version 1.8 book - Part 57 of 202
The Ring programming language version 1.8 book - Part 57 of 202The Ring programming language version 1.8 book - Part 57 of 202
The Ring programming language version 1.8 book - Part 57 of 202
 
The Ring programming language version 1.2 book - Part 38 of 84
The Ring programming language version 1.2 book - Part 38 of 84The Ring programming language version 1.2 book - Part 38 of 84
The Ring programming language version 1.2 book - Part 38 of 84
 
The Ring programming language version 1.8 book - Part 52 of 202
The Ring programming language version 1.8 book - Part 52 of 202The Ring programming language version 1.8 book - Part 52 of 202
The Ring programming language version 1.8 book - Part 52 of 202
 
Utility Classes Are Killing Us
Utility Classes Are Killing UsUtility Classes Are Killing Us
Utility Classes Are Killing Us
 
The Ring programming language version 1.5.2 book - Part 51 of 181
The Ring programming language version 1.5.2 book - Part 51 of 181The Ring programming language version 1.5.2 book - Part 51 of 181
The Ring programming language version 1.5.2 book - Part 51 of 181
 
The Ring programming language version 1.8 book - Part 66 of 202
The Ring programming language version 1.8 book - Part 66 of 202The Ring programming language version 1.8 book - Part 66 of 202
The Ring programming language version 1.8 book - Part 66 of 202
 
The Ring programming language version 1.5.4 book - Part 51 of 185
The Ring programming language version 1.5.4 book - Part 51 of 185The Ring programming language version 1.5.4 book - Part 51 of 185
The Ring programming language version 1.5.4 book - Part 51 of 185
 
[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
 
The Ring programming language version 1.3 book - Part 40 of 88
The Ring programming language version 1.3 book - Part 40 of 88The Ring programming language version 1.3 book - Part 40 of 88
The Ring programming language version 1.3 book - Part 40 of 88
 
The Ring programming language version 1.6 book - Part 54 of 189
The Ring programming language version 1.6 book - Part 54 of 189The Ring programming language version 1.6 book - Part 54 of 189
The Ring programming language version 1.6 book - Part 54 of 189
 
Asynchronous programming FTW!
Asynchronous programming FTW!Asynchronous programming FTW!
Asynchronous programming FTW!
 
[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
 
The Ring programming language version 1.5.3 book - Part 50 of 184
The Ring programming language version 1.5.3 book - Part 50 of 184The Ring programming language version 1.5.3 book - Part 50 of 184
The Ring programming language version 1.5.3 book - Part 50 of 184
 
The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212The Ring programming language version 1.10 book - Part 71 of 212
The Ring programming language version 1.10 book - Part 71 of 212
 
Ayam potong
Ayam potongAyam potong
Ayam potong
 
Snake report ROHIT MALAV
Snake report ROHIT MALAVSnake report ROHIT MALAV
Snake report ROHIT MALAV
 

Viewers also liked

Agricultura biologica-nas-escolas seabra
Agricultura biologica-nas-escolas seabraAgricultura biologica-nas-escolas seabra
Agricultura biologica-nas-escolas seabraIlda Bicacro
 
University of Melbourne _ Pursuit 2014, Page 4
University of Melbourne _ Pursuit 2014, Page 4University of Melbourne _ Pursuit 2014, Page 4
University of Melbourne _ Pursuit 2014, Page 4Sophie Schmidt
 
Evaluation Pro - Forma
Evaluation Pro - FormaEvaluation Pro - Forma
Evaluation Pro - Formaniamhdarby
 
Testimonial Youming Ma .PDF
Testimonial Youming Ma .PDFTestimonial Youming Ma .PDF
Testimonial Youming Ma .PDFYouming Ma
 
Questionnaires for research methodology
Questionnaires for research methodologyQuestionnaires for research methodology
Questionnaires for research methodologyIlli Elas
 
Prysmian FRZHMB Low Voltage LV Fire Performance FP Cable Joint Kits
Prysmian FRZHMB Low Voltage LV Fire Performance FP Cable Joint KitsPrysmian FRZHMB Low Voltage LV Fire Performance FP Cable Joint Kits
Prysmian FRZHMB Low Voltage LV Fire Performance FP Cable Joint KitsThorne & Derrick International
 
Itb vocab unit 3
Itb vocab unit 3Itb vocab unit 3
Itb vocab unit 3zedecker99
 
Rest and Play Your Way Through Your Work Day!
Rest and Play Your Way Through Your Work Day!Rest and Play Your Way Through Your Work Day!
Rest and Play Your Way Through Your Work Day!Being Human Ally Inc.
 
Клуб "Млад огнеборец"
Клуб "Млад огнеборец"Клуб "Млад огнеборец"
Клуб "Млад огнеборец"Rosi Pavlova
 
Aproximações sobre a Dignidade humana sob a ótica de kant
Aproximações sobre a Dignidade humana sob a ótica de kantAproximações sobre a Dignidade humana sob a ótica de kant
Aproximações sobre a Dignidade humana sob a ótica de kantAdna Paula
 
Etapas y fases en el diseño
Etapas  y fases en el diseñoEtapas  y fases en el diseño
Etapas y fases en el diseñoNombre Apellidos
 
Симетрія
СиметріяСиметрія
Симетріяninelka92
 
Asistenciajunio10
Asistenciajunio10Asistenciajunio10
Asistenciajunio10colegiommc
 

Viewers also liked (17)

Agricultura biologica-nas-escolas seabra
Agricultura biologica-nas-escolas seabraAgricultura biologica-nas-escolas seabra
Agricultura biologica-nas-escolas seabra
 
University of Melbourne _ Pursuit 2014, Page 4
University of Melbourne _ Pursuit 2014, Page 4University of Melbourne _ Pursuit 2014, Page 4
University of Melbourne _ Pursuit 2014, Page 4
 
Initialtesteso 140106095320-phpapp01
Initialtesteso 140106095320-phpapp01Initialtesteso 140106095320-phpapp01
Initialtesteso 140106095320-phpapp01
 
Evaluation Pro - Forma
Evaluation Pro - FormaEvaluation Pro - Forma
Evaluation Pro - Forma
 
Italy
ItalyItaly
Italy
 
Testimonial Youming Ma .PDF
Testimonial Youming Ma .PDFTestimonial Youming Ma .PDF
Testimonial Youming Ma .PDF
 
Questionnaires for research methodology
Questionnaires for research methodologyQuestionnaires for research methodology
Questionnaires for research methodology
 
Grammar 3
Grammar 3Grammar 3
Grammar 3
 
Prysmian FRZHMB Low Voltage LV Fire Performance FP Cable Joint Kits
Prysmian FRZHMB Low Voltage LV Fire Performance FP Cable Joint KitsPrysmian FRZHMB Low Voltage LV Fire Performance FP Cable Joint Kits
Prysmian FRZHMB Low Voltage LV Fire Performance FP Cable Joint Kits
 
Itb vocab unit 3
Itb vocab unit 3Itb vocab unit 3
Itb vocab unit 3
 
Rest and Play Your Way Through Your Work Day!
Rest and Play Your Way Through Your Work Day!Rest and Play Your Way Through Your Work Day!
Rest and Play Your Way Through Your Work Day!
 
Клуб "Млад огнеборец"
Клуб "Млад огнеборец"Клуб "Млад огнеборец"
Клуб "Млад огнеборец"
 
Aproximações sobre a Dignidade humana sob a ótica de kant
Aproximações sobre a Dignidade humana sob a ótica de kantAproximações sobre a Dignidade humana sob a ótica de kant
Aproximações sobre a Dignidade humana sob a ótica de kant
 
Etapas y fases en el diseño
Etapas  y fases en el diseñoEtapas  y fases en el diseño
Etapas y fases en el diseño
 
Симетрія
СиметріяСиметрія
Симетрія
 
Asistenciajunio10
Asistenciajunio10Asistenciajunio10
Asistenciajunio10
 
Tarig Nagmeldin CV docx
Tarig Nagmeldin CV  docxTarig Nagmeldin CV  docx
Tarig Nagmeldin CV docx
 

Similar to New

Programa Sumar y Multiplicar
Programa Sumar y MultiplicarPrograma Sumar y Multiplicar
Programa Sumar y MultiplicarAnais Rodriguez
 
MineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdfMineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdfaniyathikitchen
 
Bank management system project in c++ with graphics
Bank management system project in c++ with graphicsBank management system project in c++ with graphics
Bank management system project in c++ with graphicsVtech Academy of Computers
 
The main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfThe main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfasif1401
 
In Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdfIn Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdfanjandavid
 
Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++Santiago Sarmiento
 
public interface Game Note interface in place of class { .pdf
public interface Game  Note interface in place of class { .pdfpublic interface Game  Note interface in place of class { .pdf
public interface Game Note interface in place of class { .pdfkavithaarp
 
ANS#include iostream int Rn_get(int low, int high); int cva.pdf
ANS#include iostream int Rn_get(int low, int high); int cva.pdfANS#include iostream int Rn_get(int low, int high); int cva.pdf
ANS#include iostream int Rn_get(int low, int high); int cva.pdfanikkothari1
 
#include -stdio-h- #include -stdlib-h- #include -stdbool-h- #include - (1).docx
#include -stdio-h- #include -stdlib-h- #include -stdbool-h- #include - (1).docx#include -stdio-h- #include -stdlib-h- #include -stdbool-h- #include - (1).docx
#include -stdio-h- #include -stdlib-h- #include -stdbool-h- #include - (1).docxPiersRCoThomsonw
 
package com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfpackage com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfinfo430661
 

Similar to New (20)

Dev C++ Code Basic Loop
Dev C++ Code Basic LoopDev C++ Code Basic Loop
Dev C++ Code Basic Loop
 
DEV C++
DEV C++DEV C++
DEV C++
 
Rabia
RabiaRabia
Rabia
 
Cpp c++ 1
Cpp c++ 1Cpp c++ 1
Cpp c++ 1
 
Programa Sumar y Multiplicar
Programa Sumar y MultiplicarPrograma Sumar y Multiplicar
Programa Sumar y Multiplicar
 
MineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdfMineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdf
 
Adventure time
Adventure timeAdventure time
Adventure time
 
Bank management system project in c++ with graphics
Bank management system project in c++ with graphicsBank management system project in c++ with graphics
Bank management system project in c++ with graphics
 
The main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfThe main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdf
 
In Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdfIn Java using Eclipse, Im suppose to write a class that encapsulat.pdf
In Java using Eclipse, Im suppose to write a class that encapsulat.pdf
 
Mouse and Cat Game In C++
Mouse and Cat Game In C++Mouse and Cat Game In C++
Mouse and Cat Game In C++
 
Asssignment2
Asssignment2 Asssignment2
Asssignment2
 
cosc 281 hw2
cosc 281 hw2cosc 281 hw2
cosc 281 hw2
 
program C++ Atm
program C++ Atmprogram C++ Atm
program C++ Atm
 
Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++Simulador carrera de caballos desarrollado en C++
Simulador carrera de caballos desarrollado en C++
 
public interface Game Note interface in place of class { .pdf
public interface Game  Note interface in place of class { .pdfpublic interface Game  Note interface in place of class { .pdf
public interface Game Note interface in place of class { .pdf
 
ANS#include iostream int Rn_get(int low, int high); int cva.pdf
ANS#include iostream int Rn_get(int low, int high); int cva.pdfANS#include iostream int Rn_get(int low, int high); int cva.pdf
ANS#include iostream int Rn_get(int low, int high); int cva.pdf
 
#include -stdio-h- #include -stdlib-h- #include -stdbool-h- #include - (1).docx
#include -stdio-h- #include -stdlib-h- #include -stdbool-h- #include - (1).docx#include -stdio-h- #include -stdlib-h- #include -stdbool-h- #include - (1).docx
#include -stdio-h- #include -stdlib-h- #include -stdbool-h- #include - (1).docx
 
package com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfpackage com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdf
 
Ch4
Ch4Ch4
Ch4
 

New