integer tag

18 questions


1 answers
100 views
0
I want to change the string from Python to float or int

From Python30.33333 to float 30.333330 like int 30What should I do to change my brother?


1 answers
81 views
0
To divide two integers and save them as prime numbers?

I thought 0.5 would come out if I said 1/2, but 0 came outIf you divide two integers, you just cut off the decimal pointWhen a and b are int c = a/bHow do we get c to float as a result?a = 1b = 2print...


1 answers
164 views
0
How do I cast an object as int in Java?

I want to cast an object as int. How do I do it

2 years ago

1 answers
145 views
0
How do I write BigInteger in Java?

BigInteger sum = BigInteger.valueOf(0);for(int i = 2; i < 5000; i++) { if (isPrim(i)) { sum.add(BigInteger.valueOf(i)); }}I wrote it like this. The value of sum is always 0. Is there something wro...

2 years ago

1 answers
83 views
0
Long question on Android

inti = 11818518518518581; I know that this should be corrected to long. So I know that you have to put an L after long i = 11818518518518581L to recognize it as long.But now longi = arraylist.get(arra...


2 answers
82 views
0
If I create objects with the same value of Integera and b in Java, do I create new objects?

Hello! I'm asking you a question because I'm curious about the example in a Java book.public static void main(String[] args) { Integer o1 = 1000; Integer o2 = 1000; Integer o3 = new Integer(1000); Int...

2 years ago

1 answers
123 views
0
How do you define unsigned int in Java?

Is there a way to define unsigned int in Java? What does unsigned mean in Java?I'm looking at String.hashcode right now and I want to see the possibility of a 32-bit unsigned int crash here.

2 years ago

1 answers
135 views
0
How do I check if an integer is even or odd?

It's the same as the title.How do I check if an integer is even or odd?

2 years ago

1 answers
127 views
0
How do I print "unsigned long"?

I know how to output the int, long, float, and double types in CI don't know how to print unsigned longprintf(%lu\n, unsigned_boo)printf(%du\n, unsigned_boo)printf(%ud\n, unsigned_boo)printf(%ll\n, un...


1 answers
160 views
0
How to change Long to Integer

How can I change Long to Integer?

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.