+ 1
What is wring with this one?
Hibrish number https://code.sololearn.com/c3Y0MCj9ugFM/?ref=app
5 Antworten
+ 3
while(R =! 0) { // R != 0
int a=0; // Local to the while body -- You can't specify the size of the array as `int Arr[a];`
DC *= 10;
R = (R-(IP%DC))*10/DC;
a++; // has no effect
}
corrected as
int a = 0; // Now, it's accessable for `int Arr[a];`
while(R != 0) {
DC *= 10;
R = (R - (IP % DC)) * 10 / DC;
a++;
}
~~~~~~
int Arr[a]; // Just like the previous excercise, should be allocated dynamically as
int *Arr = new int[a];
//...
delete[] Arr;
~~~~~~~~
There are some other syntax errors that you should take care of.
+ 3
Sooo, now it's the best time to bridge the gap in your programming knowledge!
http://www.cplusplus.com/doc/tutorial/dynamic/
+ 2
I used 15_20 lines just to use static memory('cause I've forgot dynamic memory😅)
+ 2
Tnx😍😍😍