+ 10

CHALLENGE: WAP to get an array and print its reverse

23rd Jan 2018, 6:20 PM
DEEPENDU PANDIT
DEEPENDU PANDIT - avatar
9 odpowiedzi
4th Feb 2018, 1:46 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 6
@Timon it's Write a Program (WAP)
24th Jan 2018, 3:36 AM
Himani
23rd Jan 2018, 8:45 PM
davy hermans
davy hermans - avatar
+ 3
https://code.sololearn.com/cPCcVONJH5o5/?ref=app
3rd Feb 2018, 8:29 PM
...
0
The code gets user input and turns every digit in the number into array items then reverses it https://code.sololearn.com/WEFwgxRooITM/?ref=app
23rd Jan 2018, 8:36 PM
the_code_genin
the_code_genin - avatar
0
There's std::reverse() in C++.
24th Jan 2018, 5:12 AM
Timon Paßlick
0
const int size; void reverse( int A[size] ) { cout<< "enter the array" << endl; for ( int i=0; i< size; i++) { cin>> A[i] ; int j; } if ( j= size-1) { for (j=size -1; j>0; j--) cout<< A[j]; } } // reply if u see any mistake
26th Jan 2018, 4:12 PM
vickyvirus258
- 1
What's WAP?
23rd Jan 2018, 8:36 PM
Timon Paßlick
- 1
@vickyvirus Do you know about the data containers of the standard library?
26th Jan 2018, 5:12 PM
Timon Paßlick