Home > Back-end >  Of new questions have bosses can say how to do this program is to identify the word
Of new questions have bosses can say how to do this program is to identify the word

Time:09-25

#include
using namespace std;
Int main ()
{
Char ch [10]="0";
int count=0;
Cout & lt; <"Enter words (to stop, type the word done) :";
Cin & gt;> Ch;

While (STRCMP (ch, "done")!=0)
{
Cin & gt;> Ch;
count++;
}
Cout & lt; }

CodePudding user response:

STRCMP function is string compare (string), used to compare two strings and returns an integer, according to the results of the comparison of basic form for STRCMP (str1, str2), if the str1=str2, it returns zero; If the str1 & lt; Str2, it returns a negative number; If the str1 & gt; Str2, it returns a positive number,
  • Related