Horje
printing in column c++ Code Example
printing in column c++
#include <iostream>
#include <iomanip>
#include <string>

int main()
{
   std::string arr[]={"2","1","3","16","8","3","4","1","2"};
   const int arrlength = sizeof(arr)/sizeof(*arr);
   const int matrixSize = 3;

   for(int row = 0; row < matrixSize; ++row)
   {
      for (int index = row; index < arrlength ; index += matrixSize)
         std::cout << arr[index] << std::setw(5);
      std::cout << "\n";
   }

  return 0;
}




Cpp

Related
namespace "std" n'a pas de membre "filesystem" Code Example namespace "std" n'a pas de membre "filesystem" Code Example
tu hi hai aashiqui song lyrics Code Example tu hi hai aashiqui song lyrics Code Example
can you use rand to read in from an external file inc++ Code Example can you use rand to read in from an external file inc++ Code Example
c++ to mips converter online Code Example c++ to mips converter online Code Example
footnote appears in the middle latex Code Example footnote appears in the middle latex Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8