Posts by Daniel Soares • 73 points
3 posts
-
1
votes1
answer880
viewsQ: Compute Principal Diagonal Sum of a Javascript Matrix (Node)
I’m trying to calculate the main diagonal of an array in Js, someone could help ? function calcularDiagonal(matriz) { let soma = 0; for(let i = 0; i < matriz.length; i++) { for(let j = 0; j <…
-
4
votes3
answers450
viewsQ: Comparison of Vector regardless of position
#include<stdio.h> main(){ int vetoresIguais= 0; int vetor[3] = {10,20,5}; int vetor1[3]= {20,50,15}; int i; int j; for(i = 0; i < 3; i++){ for(j = i; j < 3;j++){ if(vetor[i] ==…
casked Daniel Soares 73 -
0
votes1
answer56
viewsQ: Error in storing names in.txt file
#include <stdio.h> //inicio do programa main() { //cria estruturas typedef struct { char nome[10]; } movimentacoes; //cria as variavéis FILE *arq; movimentacoes nome; //recebe o nome da conta…
casked Daniel Soares 73