Questions tagged as 'array'

3
answers

Array problem in Java

I'm trying to create a contacts calendar in java, I'm using some classes that were requested in the exercise. the main class: import java.util.Scanner; public class Lista15Q03 { public static void main(String[] args) {...
asked by 03.01.2017 / 16:59
1
answer

Level PHP Array

I need to put this array all on the same level, I tried that way, but I could not leave everyone at the same level, below the input, output and code I tried. Entry [ (int) 0 => [ 'id' => (int) 1, 'nome' =>...
asked by 13.04.2018 / 16:10
2
answers

How to pass CSV file data to an array in Java? [duplicate]

Ihavea.CSVfilewithseveralnumbersintwocolumns(1032,54832).Ineedtogetthesenumbersandpassthemtoavector.HowdoIdothis?ImadeacodetoimportthefileandIcandisplaythenumbers,butatthetimeofpassingthevaluestothevector,I'mhavingproblems.BelowiswhatIdid(Thi...
asked by 19.11.2018 / 00:33
1
answer

Prime numbers are not listed

I'm trying to create a C program that shows all prime numbers from 1 to 100 using brute force, but my program shows nothing on the screen. #include <stdio.h> #include <stdlib.h> int main() { int x=100,n=2,z=0; int p[z];...
asked by 17.11.2018 / 20:22
1
answer

Design of algorithms by division and conquest

I need to design this algorithm using the paradigm of division and conquest (strong induction). I can not get out of the place ...    Let A and B be two integer vectors such that the total number of integers in the two vectors is n , an...
asked by 17.09.2018 / 05:54
1
answer

PHP script to count comma-separated records [duplicate]

In the database I have a column that receives strings in this format: ["87", "12", "67"] What I need is to count each value separated by a comma and assign it to some variable, remembering that there are more rows. In this case I would have...
asked by 04.10.2018 / 22:42
1
answer

Doubt with search in array [closed]

My question is: How do I perform a search on a key and return its value? Ex. $contagem = array('metodologia' => '1','facilidade' => '10') I would like to search for ease and return the value 10. Thank you!     
asked by 19.09.2016 / 23:27
1
answer

Getting id and name of an array [duplicate]

I'm getting a response from my API which is an array containing some information between them idTipoTitulo and nome occurs that I only need these two attributes to display on the screen. My method $http({ method...
asked by 31.10.2017 / 12:04
1
answer

Save user input in a loop [closed]

I want to get the list of the variable numeros , generated by the following loop: Scanner kb = new Scanner (System.in); double [] numeros= new double[10]; for (int i = 0; i < numeros.length; i++) { System.out.println("o proximo nu...
asked by 23.09.2016 / 14:09
2
answers

Receiving an array as a parameter in a PHP function

Well, the subject may be old but there was this doubt and not patience in rewriting the code ... The following code is not generating results. There is a function that basically looks like this: function Preco(&$p) { $soma=array();...
asked by 19.07.2016 / 22:10