Posts by Elder Son • 131 points
13 posts
-
1
votes1
answer93
viewsQ: Why use a pointer to that algorithm?
When I withdraw the code does not work. Why? And why the algorithm of Insertion Sort is only suitable for list of small entries, type array and list (little)? void insert_sort(int *vetor, int TAM){…
-
1
votes1
answer53
viewsQ: How do I make the methods receive the x and y parameters?
When I ask for the values of x and y, i want to make the operations of the methods receive the values entered by the user. What to do? public class Calculadora { Scanner sc = new Scanner(System.in);…
-
0
votes1
answer286
viewsQ: What is the function of this code snippet? Data structure (List)
I need to understand what each command of this is capable of doing, as it is without comment. struct Node{ int num; struct Node *prox; }; typedef struct Node node; int tam; int vazia(node *LISTA) {…
-
0
votes4
answers123
viewsQ: Is there a smaller way to resolve the question below? and know if it is correct
Create an algorithm that contains an integer vector. Then, your algorithm should generate two more vectors. The first vector must store the numbers of the initial vector in ascending order and the…
-
1
votes1
answer7512
viewsA: How do I calculate age using php and html?
//Resolvi: <?php $data = $_POST['data']; // separando yyyy, mm, ddd list($ano, $mes, $dia) = explode('-', $data); // data atual $hoje = mktime(0, 0, 0, date('m'), date('d'), date('Y')); //…
-
-1
votes1
answer7512
viewsQ: How do I calculate age using php and html?
Using the data from html in the php how to calculate age? Date of birth on HTML: <form method="POST" action="doc.php"> Nascimento: <input type="date" id="data" name="data"> </form>…
-
0
votes3
answers2646
viewsQ: How to disable an input field?
After receiving a value, how to block an input field so that it does not have its value changed? below there are two fields; how to block only the field 'FANTASY NAME' and keep 'CNPJ' to receive a…
-
1
votes1
answer2098
viewsQ: need to make the form fill the info from the search by cnpj
Below is an excerpt of the code. I have doubts about how to make, when clicking SEARCH, the CNPJ is found on the site receitasws and the fields below are filled:…
-
0
votes2
answers112
viewsQ: What is the logic behind this challenge?
QUESTION: In football, teams fight over field space and score points in two different ways: through the touchdown, which can be worth 6 or 7 points and through the goal kick, which is worth 3…
-
0
votes2
answers3167
viewsQ: Operations with C++ matrices
To perform the sum of items of a matrix (primary diagonal and secondary diagonal) I was able to write the following code. Can someone help me dry up the code? so I can compare the codes... C++: And…
-
1
votes1
answer64
views -
1
votes1
answer248
viewsQ: What is the reason why a vector with no set size does not work?
If you create a vector: Thus int Vetor[0]; works #include <iostream> using namespace std; int main() { int vetor [1]; vetor[0] = 12; cout << vetor[0] << endl; } Thus int Vetor[];…
-
2
votes2
answers186
viewsQ: Why do you accept values beyond the size of the vector?
INT vetor[3]; vetor[0] = 110; vetor[1] = 12; vetor[2] = 30; vetor[3] = 13; vetor[4] = 1; Cout << vetor[0]; Cout << vetor[1]; Cout << vetor[2]; Cout << vetor[3]; Cout <<…