Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

print array elements with space c++

#include <iostream> // cout
#include <iomanip> // setw
int main()
{
    int array[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };       
    for (auto n : array)
    {
        std::cout << std::setw(4) << n;
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #print #array #elements #space
ADD COMMENT
Topic
Name
6+5 =