How do i write a while loop terminating when ZZZ is entered??
#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;
}