Anonymous
Can anyone talk about the preciseness of sqrtl() function?
olli
@ollirz
- there is a leading space before case - "c" in case should be capital - wrong logic e.g. 41 returns 20 20
olli
Thats right i think cuz they say they gonna send an integer check
such that neither A nor B contains any digit that is a 4, and A + B = N you're violating this constraint
Anonymous
Been told to use long int
Muhammad
?
Anonymous
So gotta use double?!
olli
Been told to use long int
31 bit are enough to represent 10^9, so your int is probably big enough
Anonymous
Yah I thought that but they mentioned oversized quite a few times soo
Anonymous
Umm so now i should change ll to double n check it again?
olli
Umm so now i should change ll to double n check it again?
your result is still wrong - so it doesn't matter
Anonymous
Ok gotta reprogram that again
Anonymous
20.5 20.5 would what we get
Anonymous
If i change it to double right?
olli
20.5 20.5 would what we get
you should output any A and B, so that A + B = N and neither A nor B contains a 4. So for 41 you can output 39 and 2 or 20 and 21
olli
Yeah 20.5 doesnt caontain a four
it's not an integer though
Anonymous
it's not an integer though
Umm so okay for 41 A n B should be such that there ints
Anonymous
Okay I get it now
olli
Umm so okay for 41 A n B should be such that there ints
A and B shall always be integral values - just read the task again
Anonymous
Anonymous
Good Luck :)
Thank you
Anonymous
I wanted to find square root of numbers of size 1e12 but binary search isn't helping nor I'm sure if any inbuilt cpp function will work. Can anyone advise some idea?
Anonymous
long long
👎🏿
Anonymous
oh seems like I've got an idea.
Anonymous
`
Anonymous
“```”
Anonymous
when comparing strings like char somestring[20] = “hello” and char anotherstring[40] = “long” and you do like an while loop like if(somestring > anotherstring) are we comparing if they have the same character or length or something
14•08
Amean loop ?
Anonymous
this is the problem i was working on that led me to this question. i have the right answer already i just want to understand a little better
Anonymous
@Maestrowscki10
Augmented
hi, i have specific question...
Anonymous
Augmented
is there any penalty, if enum {} is nested inside a c++ class
Anonymous
this is the answer i have, and it works , just want to understand the while loop condition better
14•08
@Maestrowscki10
Yo must have counter for doing that bro
Augmented
instead of using of static const
Anonymous
Yo must have counter for doing that bro
thats what i thought, i wouldnt even use a while loop , i would use a for loop but it works
Anonymous
instead of using of static const
No penalty Write your question in ONE message
Anonymous
way better lol
Anonymous
but its the question in the book
14•08
but its the question in the book
The books yo give me? Right
Anonymous
The books yo give me? Right
i gave away alot of free books, and have been banned a few times for it lol. which book ?
Anonymous
i have a library of over 100 books i think
14•08
😂😂 calm let's go OT
Ilya
whats a ASCIIZ string
buffer of char containing sequence of symbols of type "char" and ended by '\0' symbol
Augmented
No penalty Write your question in ONE message
I have few constants, and normally i delcare them as static const, inside a class in the header file, but there must be initialiser statement in the .cpp file as well, by using enum inside the class to define some constants, i can omit the initialiser part and the cpp file at all... is there difference in the way compiler will use these numbers... code lenght, memory usage? that's i mean for penalty
Anonymous
I have few constants, and normally i delcare them as static const, inside a class in the header file, but there must be initialiser statement in the .cpp file as well, by using enum inside the class to define some constants, i can omit the initialiser part and the cpp file at all... is there difference in the way compiler will use these numbers... code lenght, memory usage? that's i mean for penalty
If your constants ARE connected to each other by meaning and semantics, you use them as enumerators and you definitely need to use enum, especially enum class If your constants ARE NOT connected in any way, you can declare your constants inline — initilize them in-place — and you don't need to initilize them in cpp file
Anonymous
buffer of char containing sequence of symbols of type "char" and ended by '\0' symbol
when comparing strings like char somestring[20] = “hello” and char anotherstring[40] = “long” and you do like an while loop like if(somestring > anotherstring) are we comparing if they have the same character or length or something
Anonymous
like in the document i shown earlier
Anonymous
If you use compiler with modern C++
Anonymous
this function is used to reverse a string
Anonymous
So what? It compares POINTERS, not STRINGS
Anonymous
I want to know why we have to put *p='\0' here
Anonymous
/warn pictures of screem are not allowed
Anonymous
Anonymous
string variables are like pointers to the first character of a string i am correct ?