A data type that represents an integer. An integer is a whole number that can be negative, positive, or zero. (i.e. ...-2, -1, 0, 1, 2...) Use this tag for questions about using, storing, or manipulating integers.

learn more…| top users | synonyms

0
votes
5answers
36 views

Java method which sums two one dimensional arrays

I am a Java beginner and currently learning for an exam. I got a book with tasks and one task is two write a method, that sums two int arrays if both have the same length. If they do not have the same ...
-3
votes
2answers
50 views

Why command line argument -12345678969 is considered to be >1?

This is the program to check whether given number is Armstrong number or not#include<stdio.h>#include<stdlib.h>#include<limits.h>int main(int argc, char *argv[]){ int ...
0
votes
1answer
39 views

Haskell - calculating an Int *100 : why does one way work, however, the other way provides an error?

I am new to haskell and am trying to learn why certain things do not compile in haskell. For example, I get the following error: • Couldn't match expected type ‘Int -> Float’...
1
vote
1answer
29 views

Splitting strings of numbers in python [duplicate]

When I try to split a string of numbers with '0', it gives me a wrong output.for x in str(0123):print x83But if there is no 0, it is correct.for x in str(1234):print x1234Can ...
-2
votes
0answers
50 views

Understanding int & in java [duplicate]

I needed to get the screensize in android, an o found something that i don't entirely understand. I hope you can explain. I researched a while, but I didn't found the documentation for that.int ...
1
vote
3answers
34 views

Displaying several integers in one label

I need some clarification. I'm doing a lab project that wants me to gather 5 numbers, then when a button is clicked it adds them, divides them into dozens, and also tells the remainder. here's a ...
0
votes
1answer
36 views

Getting TypeError comparing coordinates in Python turtle event handler

I can't figure out how to convert x and y into an integer coming from a stringimport turtlet=turtle.Turtle()s=turtle.Screen()t.penup()t.speed(0)def draw_grid():count=0distance=...
0
votes
2answers
19 views

Two strings from a file, converting them into an integer and then subtracting one from another

In this code I am trying to read two values from different files and then subtract one from the other. The code compiles but when I click the button the console displays an error sayingException in ...
3
votes
1answer
20 views

Is it possible to change only some part of decimal in mysql?

I know it is kind of foolish question but is it possible to change only integer part of decimal value.e.g suppose I have number 12.34 then I want to change only 12 and .34 remain as it is.I have two ...
-2
votes
1answer
40 views

Int value is changing by itself after a for loop

In my CRA_Account.cpp file my socialInsuranceNumber gets changed after for (j=0; j <=max_name_length; j++) {given_name[j]=givenName[j];}occurs.example: If i ...
1
vote
1answer
82 views

c++ getting a negative value when adding two absolute (positive) values [duplicate]

I am getting a strange problem. I am getting a negative value when adding two absolute (positive) values. I am trying to solve this exercise from codingame (link: https://www.codingame.com/ide/puzzle/...
-3
votes
1answer
34 views

Mismatch in I/O (JAVA) int/String

I have to write a program where the user write the price of an item and, when the users press ctrld the program will print the lower price (without the name of the item).The program doesn't print ...
-1
votes
2answers
26 views

separating a int into bytes (no String) Python 2

Basically I want to separate an int, let's say 77121980 into bytes more or less having the following structure (0x04, 0x98, 0xc9, 0xbc) No Strings. or at least (4, 152, 201, 188). but so far i have ...
3
votes
2answers
47 views

Issue with parsing and multiplying by 1000 in order to get ms instead of seconds

I'm having an issue after submitting a form with the following error:Input string was not in a correct format.My code:Decimal intervalStart=Decimal.Parse(IntervalTime.Text);Decimal ...
-2
votes
2answers
30 views

Scala Cast List of Any to list of Int

Given a List of Any:val l=List(2.9940714E7, 2.9931662E7, 2.993162E7, 2.9931625E7, 2.9930708E7, 2.9930708E7, 2.9931477E7)I need to cast each item to Int.Works:l(1).asInstanceOf[Double].toInt...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,