Questions tagged as 'array'

2
answers

How to traverse an array within another indexed array

I try to save records of indexed buildings in my array since I can register 1 or more buildings in a single form, for each building I want to store name_building, number_calls, and prefix_calls. My code is as follows $edificios = array();...
asked by 27.10.2017 / 22:46
2
answers

How to add more positions in zero to an array [duplicated]

friends I have this result array(3) { [0]=> array(1) { ["dato"]=> string(7) "3522.40" } [1]=> array(1) { ["dato"]=> string(7) "6748.20" } [2]=> array(1) { ["dato"]=> string(7) "7000.0...
asked by 24.10.2017 / 23:22
2
answers

"Unreachable statement" error when executing program

When compiling the following program in the cmd I get the error:    unreachable statement public class Ejercicio1{ public static void main(String[] args){ //A) int[] f = {10,2,4,5,4,3,8,9,2,3}; System.out.prin...
asked by 26.09.2017 / 23:30
1
answer

convert sql result into two-dimensional array in php

I want to put the results of an sql query in a two-dimensional array. The table would be something like id - > 1 name - > pepe last- > Garcia and other fields ... and I want you to put it in a two-dimensional array array [index] ['same...
asked by 01.11.2017 / 13:46
1
answer

add values of an array with recursion [duplicate]

I have to perform the sum of the values of an array using recursion (exercise for university) I am not able to make the recursive call by passing an array, I leave the code in case you can give me a hand. Code: import java.util.Scanner;...
asked by 19.09.2017 / 12:42
1
answer

Dynamic array in C

I have this little code of a dynamic array exercise, it introduces me up to 6 elements and it displays them correctly, but if I put it from 8, it jumps an error "the program stopped working" Code: int main() { int cantidad; int *x;...
asked by 03.09.2017 / 19:17
1
answer

Why does not the result of an arrangement print me?

I understand that up to a certain point my code is fine but in a certain part of the syntax it does not do the job well #include <stdio.h> #include <conio.h> #include <iostream> #include <string> main() { int a,b,c; ch...
asked by 23.11.2017 / 08:08
1
answer

Implement a class with a swift protocol

I am trying to implement a class that should give me the weather, I am asked for a string as a parameter and also a completion and that is exactly where I get lost on how to implement it. Try to call it using weatherDataWith to display...
asked by 25.08.2017 / 17:31
1
answer

Arranged Two-dimensional Array

I have a code made in C in which you enter data in a two-dimensional array and sort the rows, I also want you to order the columns for example you enter: 9 8 7 6 5 4 3 2 1 and it looks like this: 7 8 9 4 5 6 1 2 3 that really is fine because...
asked by 17.08.2017 / 00:15
1
answer

Save data in an array using foreach loop

Again I come to ask for help, this time I have to save the values of a variable inside an array and then show them, this variable is within a foreach cycle, I leave the code: $strProyecto = $conex->getIndCol('id', sqlProyectos());//proy...
asked by 14.08.2017 / 22:56