|
-
Apr 27th, 2002, 05:18 PM
#1
Thread Starter
Junior Member
Testing input data
This is so simple I am embarrassed. Well not really being a first semester C++ student.
What is the code to perform the following:
I want to test 'answer' to be sure it contains ONLY digits....
Any help will greatly be appreciated!!
Thank you
Ask user to input a value
//start of snippet
int answer;
cout << "What is the answer? ";
cin >> answer;
//end of snippet
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|