Hello, Does anyone know how I can authenticate with GitHub in Windows WSL when uploading my repo it asks me for the following data, I put my user name and pass and it does not authenticate, I have tried with "git config ... user.name "rfhureh"" for that matter of the name and pass and mail and it keeps asking me, is there any other way to do it and avoid this problem or how could I solve it?
Home
/
user-187383
LuisKing's questions
LuisKing
Asked:
2022-06-15 14:22:01 +0800 CST
The problem is that it doesn't work with negative numbers as in the following example, can someone help me to find out what my mistake is. I've tried with -infinite but it doesn't work for me or maybe I use it wrong. THANK YOU!!!
function solution(inputArray) {
var mult1 = 0;
var mult2 = 0;
var max = 0;
var ult = 0;
for(i=0;i<inputArray.length;i++){
mult2 = mult1;
mult1 = inputArray[i] * inputArray[i+1];
if(mult1 > mult2){
max = mult1;
if(max > ult){
ult = max;
}else{
ult = ult;
};
}else{
max = mult2;
if(max > ult){
ult = max;
}else{
ult = ult;
};
};
};
console.log(ult);
};
solution([-23, 4, -3, 8, -12]);
LuisKing
Asked:
2022-07-09 19:20:15 +0800 CST
The program receives values and inserts them into an array until it receives a negative value, when it does, it must return the sum of the array, now when it does, it only returns the concatenated values, do you know why???
var arreglo = [];
function suma(arreglo){
let suma = 0;
arreglo.forEach(function(numero){
suma += numero;
});
document.write(suma);
};
do{
var valida = true;
var inserta = prompt('Inserta un numero');
if(inserta < 0){
valida = false;
// Obtenos la suma del arreglo
suma(arreglo);
}else{
arreglo.unshift(inserta);
};
}while(valida == true);