![]() |
space
Dear sir,
I trying to write a program that accept alphanumeric from users. It will display an "Error!" message if users include space and negative number. num_string[100]; void main(void) a=0; printf("Enter a word ") gets(num_string); { if (isalphanum(num_string[a] && !isspace(num_string[idx]) valid = 1; else valid = 0; } if ((valid ==0) && num_string < 0) prinf("Error!"); Thanks |
prinf("Error!");
You're going to have some problems there - printf :-) |
| All times are GMT +1. The time now is 05:24 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.