Rortha
@MissRose_bot Sorry for wrong group
olli
Anonymous
olli
Anonymous
olli
Cpp
this depends on the computation and the type of integer. Assuming signed integers, the value will be negative in most representations if the highest-order bit is set
Anonymous
Anonymous
Mhm got it
olli
Mhm got it
👍🏻 (unsigned integers will always be positive)
Anonymous
Anonymous
I'll use bigint in java
olli
I'll use bigint in java
Python uses something similar. There are also libraries for C / C++ that allow you to use arbitrary sized integers
Anonymous
Anonymous
Ok
Shubham
Ok...😊👍
klimi
/warn M. Crypto ad
Thespartann
Where is my crypto
Thespartann
Anonymous
I think the screenshots are better
Roxifλsz 🇱🇹
First one is more efficient, the second one also sorts the array needlessly. Btw, neither of them will compile, your arrays are called "a" not "arr"
Anonymous
yes
Anonymous
The time complexity of the first is n
Anonymous
o(6)
Anonymous
I wanted to write a c program of this: enter a number from user and print all even numbers between 1 to n
Anonymous
Anonymous
Can any one tell me why
Roxifλsz 🇱🇹
Be more specific, "doesn't work" doesn't really say anything to me
Roxifλsz 🇱🇹
Also, don't post your code in a photo of your screen, take a screenshot or use a snippet website, it's not hard
Anonymous
Sorry
Anonymous
When I execute it, it only says enter a number. When I enter a number and click enter nothing happens
Roxifλsz 🇱🇹
It means that the condition of the for loop is never satisfied, did you mean to use || instead of && ?
Anonymous
use ()
Anonymous
My aim is printing the even numbers, if I use II it will print odd numbers too
Anonymous
Anonymous
wait
Anonymous
Right
Anonymous
Anonymous
Anonymous
But I don't understand why this didn't work: for(i=1; i<=num && i%2=0; i++);
Anonymous
Yes I did the same thing, thanks
Anonymous
I understand. Thank you so much
Anonymous
I have difficulty in English,
Stefan
Anonymous
Stefan
you have only one '='
Stefan
i%2=0
Stefan
should be i%2==0
Stefan
and why don't you just find a k from 0 to n and 2k such that 2k <= n
Anonymous
hacker hunt
Ok sir
hacker hunt
Next time I don't do that sorry for that
hacker hunt
Hi friends can you help me I want to start a beginner at c and c++ which book I follow
hacker hunt
Tell me friend s
Mark
do you even have any friends here? :^)
Roxifλsz 🇱🇹
hacker hunt
Bro can you give me PDF books
Roxifλsz 🇱🇹
I literally gave you a link with lots of resources, if you can't be arsed to actually look at it, that's not my problem
Shubham
Anonymous
I wanted to write a program to find sum of all odd numbers from 1 to n. Here it is:
Anonymous
Anonymous
It is not working correctly. After I enter a number, it stops working
Anonymous
Could someone help me please
Roxifλsz 🇱🇹
The a++ should be inside the while loop itself, not in the if part
Roxifλsz 🇱🇹
And for this type of work, a for loop is better (easier to understand) than a while loop
BinaryByter
Anonymous
Yeah
Anonymous
BinaryByter
Roxifλsz 🇱🇹
Anonymous
Hi
Anonymous
Gi
disrupt_the_flow
https://github.com/wittmaxi/webcpp
BinaryByter
disrupt_the_flow
BinaryByter
i'm the creator of that library :D
disrupt_the_flow