I put nine digits in the vector but my array comes out with random numbers, I would like my array to come out with the numbers that are in the vector below below my code:
#include <stdio.h>
#include <locale.h>
int vetor [9];
int m...
I have a two-dimensional array (it contains data coming from the database).
To traverse this data, I use a foreach ().
I need to add an index and a value to this index at the end of each iteration of foreach ().
Imagining as if it were an arr...
I am studying the Dijkstra algorithm and have not yet tried to use adjacency list. I knew I could solve the problem with an array, but the fact is that I can not get the array in the function.
If I put the code direct in main it works as...
We are trying to use the for command to run a function y (say y=5+3x+4z ) by varying the values of z (say that z is a combination of 5 z=c(1,2,3,4,5) ) and that x is a normal size distribution 1000. After printing the values w...
I'm trying to print a two-dimensional array through in a loop for only the array it's returned through a function that I've created. I'm suspecting that the error should be in it but I can not find the error
#include <stdio.h>
#de...
Is there another method for ordering array / array in ascending or descending order without being what I used? (What would you change in this code to make it "better"?)
#include <stdio.h>
#include <stdlib.h>
void ordem (int vetor[...
I have the array
$vetor[0]['codigo'] = '1';
$vetor[0]['valor'] = '4';
$vetor[1]['codigo'] = '1';
$vetor[1]['valor'] = '2';
$vetor[2]['codigo'] = '2';
$vetor[2]['valor'] = '2';
I need to merge all values with equal codes. Doing the ab...
In case, I want to transform a list of a column into a 3x3 array in numerical order:
lista =([[1],
[2],
[3],
[4],
[5],
[6],
[7],
[8],
[9]])
Being the expected result:
([[7 8 9]
[4 5 6]
[1 2 3]])...
I have the following proposed exercise:
Make a program that mimics a text editor. Initially you will read the data entered by the user (lines of text) and create a vector in memory where the texts provided by the user will be stored (text...
Be the matrix below created from the command
simu_matrix <- matrix(runif(25,0,1),nrow=5,ncol=5)
V1 V2 V3 V4 V5
1 0.07357303 0.45524021 0.9352829 0.60466424 0.4725541
2 0.51018615 0.46044203...