Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Matrix_1
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
#include <iostream> using namespace std; int main() { int n = 5; int m = 3; int k = 1; int A[5][3]; // Matrix n x n // Filling matrix n x n with // natural numbers from 1 to n^2 for (int j = 1; j <= m; j++) { for (int i = 1; i <= n; i++) { A[i][j] = k; cout << A[i][j] << " "; k++; } cout << endl; } // By reason of return 0; }
cl.exe
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
edit mode
|
history
|
discussion