Top "Integer" questions

Common datatype in many programming languages for representing a whole number.

Round a Floating Point Number Down to the Nearest Integer?

As the title suggests, I want to take a floating point number and round it down to the nearest integer. …

python floating-point integer rounding
Convert int to ASCII and back in Python

I'm working on making a URL shortener for my site, and my current plan (I'm open to suggestions) is to …

python integer ascii encode
Python: TypeError: cannot concatenate 'str' and 'int' objects

I have this python program that adds strings to integers: a = raw_input("Enter a: ") b = raw_input("Enter b: ") …

python string printing integer
How can I convert integer into float in Java?

I have two integers x and y. I need to calculate x/y and as outcome I would like to …

java integer floating-point
Converting integer to binary in python

In order to convert an integer to a binary, I have used this code : >>> bin(6) '0b110…

python binary integer
MySQL Error 1264: out of range value for column

As I SET cust_fax in a table in MySQL like this: cust_fax integer(10) NOT NULL, and then I …

mysql sql insert integer
Converting BigDecimal to Integer

I have Hibernate method which returns me a BigDecimal. I have another API method to which I need to pass …

java integer casting bigdecimal
Alternative to itoa() for converting integer to string C++?

I was wondering if there was an alternative to itoa() for converting an integer to a string because when I …

c++ integer stdstring itoa
How to convert Integer to int?

I am working on a web application in which data will be transfer between client & server side. I already …

java integer
How to sum up an array of integers in C#

Is there a better shorter way than iterating over the array? int[] arr = new int[] { 1, 2, 3 }; int sum = 0; for (int i = 0; …

c# arrays integer