Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Matriz funcona medio raor aslñdk
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 <stdio.h> #include <stdlib.h> #include <time.h> int main ( ) { int **matriz ; int filas = 4 ; int columnas = 4 ; matriz = (int**)malloc(filas*sizeof(int*)); if (matriz == NULL){ printf("no se pudo reservar espacio en la memoria"); exit(1); } for (int i = 0 ; i < filas ; i++){ matriz[i]= (int*)malloc(columnas*sizeof(int*)); } srand(time(NULL)); for(int i = 0 ; i < filas ; i++) for(int j = 0 ; j < columnas; j++){ matriz[i][j]= rand()%4; printf("%d%d ",matriz[i][j]); } printf("\n"); }
gcc
Show compiler warnings
[
+
] Compiler args
[
+
]
Show input
Compilation time: 0.12 sec, absolute running time: 0.16 sec, cpu time: 0.01 sec, memory peak: 6 Mb, absolute service time: 0,45 sec
edit mode
|
history
|
discussion
10 20 30 10 20 00 00 30 20 10 00 00 20 20 20 20