60 412
Assignments Done
98,2%
Successfully Done
In April 2018

Answer to Question #29656 in C++ for matt

Question #29656
How do i write a while loop terminating when ZZZ is entered??
Expert's answer
#include <string>
//mian funtction
int main()
{
char inputstr[100];
printf("Enter the string: ");
gets(inputstr);

while( strcmp(inputstr,"ZZZ") == 1 ){//while inputstr!=ZZZ continue
printf("Enter the string: ");
gets(inputstr);//get string
}


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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions