RE: [Dev-C++] I am new to C ++ and need some help
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Bruce Y. <y2...@ho...> - 2000-12-11 00:46:05
|
<html><DIV>
<P>be sure to include the: #include <string></P>
<P><BR>#include <iostream.h><BR>#include <stdlib.h><BR>#include <string></P>
<P>int main()<BR>{<BR> string name;</P>
<P> do<BR> { cout << "\nPlease enter your name: ";<BR> cin >> name;</P>
<P> cout << "\nName = " << name << endl;</P>
<P> if (name == "John" || name == "john")<BR> cout << "\nThank you!!\n";<BR> else<BR> cout << "\nNo. Try again";</P>
<P> }<BR> while(name != "John" || name != "john");</P>
<P> </P>
<P> system("PAUSE");<BR> return 0;<BR>}</P></DIV><br clear=all><hr>Get more from the Web. FREE MSN Explorer download : <a href="http://explorer.msn.com">http://explorer.msn.com</a><br></p></html>
|