Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
вывод элементов массива
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//g++ 5.4.0 #include <iostream> #include <algorithm> #include <iterator> int main() { int ary[] = { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 }; { std::copy(std::begin(ary), std::end(ary), std::ostream_iterator<int>(std::cout, " ")); std::cout << '\n'; } { for(auto &e: ary) std::cout << e << ' '; std::cout << '\n'; } { std::for_each(std::begin(ary), std::end(ary), [](auto x) { printf("%d ", x); }); std::cout << '\n'; } }
g++
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 1.03 sec, absolute running time: 0.09 sec, cpu time: 0.03 sec, memory peak: 3 Mb, absolute service time: 1,14 sec
edit mode
|
history
0 2 4 6 8 1 3 5 7 9 0 2 4 6 8 1 3 5 7 9 0 2 4 6 8 1 3 5 7 9