Questions tagged as 'if'

3
answers

Problems with if doing 2 functions

I have to make a code where I calculate the imc, but if the person is 15 years old or less not to be calculated but still calculating #include <stdio.h> void main() { float peso, altura, imc, idade; printf ("digite seu...
asked by 26.03.2018 / 20:11
2
answers

Help with sum

I want to write an algorithm, in JAVASCRIPT, that reads an N numbers and adds only the even numbers var n1, n2, n3, soma; n1 = parseInt(prompt("Digite o 1º Número :")); n2 = parseInt(prompt("Digite o 2º Número :")); n3 = parseInt(prompt("Digit...
asked by 14.09.2017 / 22:35
1
answer

Infinite loop with an if within one of in Java

Good evening. I am doing a college job about an ATM and I have a small question. I am creating a do to make the replay menu of the ATM, but before the user enters the box, it will set a value for the accounts, because the balance variable...
asked by 22.04.2018 / 08:04
1
answer

When to use IF with ENDIF?

In what circumstances should you use: IF(CONDICAO) : ELSE: ENDIF;     
asked by 19.12.2017 / 01:37
2
answers

Help in printing code of repeated characters

I want to print only the characters that are repeated in the string and the number of reps. If it only appears once, I do not want to print it. I need help with the boolean expression. How do I check if the character is repeated? and has...
asked by 03.12.2017 / 06:25
1
answer

How to display only negative values in C?

I have three variables: int numero1,numero2,numero3; Once you have declared them, I am asked the user to populate them: printf("Digite o primeiro numero inteiro: "); scanf("%d", &numero1); printf("Digite o segu...
asked by 29.03.2017 / 06:36
1
answer

Logical doubt of the code in PHP

Hello everyone. I'm starting in PHP and I'm having some issues with this code: <?php function linha($semana) { echo "<tr>"; for ($i= 0; $i <= 6; $i++) { if (isset($semana[$i]))...
asked by 02.03.2017 / 15:19
1
answer

How will this if be interpreted?

I have a function that performs different actions on the page according to the callback passed to it, I am using if to check which callback was called in function('callback') but now I had to do an update on it and now it is like t...
asked by 22.12.2016 / 22:46
1
answer

doubts with if else in java script

I'm using AngularJs and I have this method $scope.login = function (email, usuario, senha) { $http.post("/Login/login", { email: email, usuario: usuario, senha: senha }) .success(function (data) { debugger; if (data ==...
asked by 01.08.2016 / 00:42
1
answer

JavaScript conditions not working [closed]

I'm doing a calculation with the following information: Style, experience, height and weight. With height and weight, I take the user's BMI and compare it with their experience. With the style, I define the type of board. First, I get t...
asked by 20.04.2016 / 17:20