76 974
Assignments Done
Successfully Done
In June 2019

Answer to Question #24860 in C++ for hani

Question #24860
Write a program that ask the questions “Do you know the capital of ALASKA”. The <br>program should display the statement “WRONG!!Please try again” when incorrect <br>answer is given and it stop until the user input the correct answer.<br>Note : Capital of ALASKA is Juneau
Expert's answer
# include <iostream>
# include <string >

using namespace std;

int main(){

string a;
cout<<"Enter Capital of Alyska:";
if (a.compare("Juneau")==0){cout<<"YES!\n"; break;}
cout<<"Wrong, try again\n";
return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions