Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

How to read integers in a text file as integers

$
0
0
I have numbers on multiple different lines, I need to read them as full numbers. (30, 2, 120) I need to put them in condition statements as numbers, meaning I am comparing them to another number with GREATER THAN or EQUAL TO.

I figured I could do this by putting the number from the text file into a variable, putting the variable in the condition, and then running through the next number in the text file, using a loop and the same variable.

But it will read the number as text right? Help please.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>