I am writing a application program that checks if the input is integer, if it is integer print the integer value only. i have no idea about that please any one help me.
I am writing a application program that checks if the input is integer, if it is integer print the integer value only. i have no idea about that please any one help me.
This coding is print if the input is integer otherwise not printed. I am trying to get only integer values i am not able to do this by using the isNumber() but i am got the error.
so,please give me the code for
if the input is like this "There is 3 apples in 1 tree" the output is only 1 & 3
If you are going to search for a number within a string, then print the number, you don't even need to convert it to an integer. If you are using negatives, be sure to modify the if statement to accept minus sign as well as digit.