Paste-bin.xyz
Archive
Sign In
Login
Register
Username
Current Password
Keep me signed in.
Username
Full Name
Email
New Password
CPP
60
reverse
Guest on 20th April 2022 02:10:32 AM
#include <iostream>
#include <string>
using
namespace
std
;
int
main
(
)
{
int
a
[
3
]
=
{
30
,
20
,
10
}
;
int
b
[
3
]
;
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
cout
<<
a
[
i
]
<<
endl
;
}
cout
<<
endl
;
for
(
int
i
=
2
;
i
>=
0
;
i
--
)
{
cout
<<
a
[
i
]
<<
endl
;
}
return
0
;
}
Raw Paste
#include
#include
using namespace std; int main () { int a[3]={30,20,10}; int b[3]; for (int i=0;i<3;i++) { cout << a[i] << endl; } cout << endl; for (int i=2;i>=0;i--) { cout << a[i] << endl; } return 0; }
Login
or
Register
to edit or fork this paste. It's free.