Questions tagged as 'else'

0
answers

How to work with if and else?

Good morning. I would like to get help from you to build this code because I am not able to implement it. $query1 = "INSERT INTO paciente VALUES ('NULL, $nome_paciente, $nome_doutor')"; $id_paciente = mysql_insert_id(); $query2 = "INSERT...
asked by 06.05.2016 / 15:56
2
answers

How to use if else in the code below

When I type the id of the artist and the other data, then I will type the id of the repairer, I need to type the id of the repairer, if it is the same as the artist, he should not accept it and ask for another id, one part, but it does not ask f...
asked by 05.09.2017 / 20:37
3
answers

How to use an if within the other?

The problem is the following 2 soccer teams, wanted to create a decision where it would show "Brazil won" or "Argentina Won" or "There was a tie." But I can not make three decisions, here is my code below. #include<iostream> using nam...
asked by 27.06.2016 / 18:23
2
answers

Change elseif code to switch case

I'm having trouble changing a code I made in else if to switch case . I'm not getting the code to work, it gets values and operation by $_GET and does the selected operation: I leave the code here: if((!is_numeric...
asked by 07.07.2016 / 15:16
4
answers

How to do if and else between 2 variables with output in a third?

I'm sorry but I had to rewrite all my question because it was not being objective enough to make me understand, when I omit code as it was the previous case is not to hide something is just to be able to perceive what they respond to me within m...
asked by 11.09.2014 / 08:50
2
answers

Stopped running when I added printf

I made a source code in C, conditional, but when I add a function printf windows reports that the program stopped running. See the code: 1 : link NOTE: I USE WINDOWS 7 HOME BASIC, AND MY EDITOR AND COMPILER IS DEVC ++, IF THAT INTERFERE IN...
asked by 16.03.2016 / 14:52
2
answers

Error in the use of else [closed]

The program is giving an error when compiling.    else without a previous if Something about else , is there something wrong with the condition if and else ? #include <stdio.h> #include <stdlib.h> int mai...
asked by 11.04.2017 / 17:54
1
answer

If it works but Else does not

So, the code below (it's complete in link ), the if it works but that else does not, what's wrong? I would like it to work like this here, in the input "NAME" by rolling the bar ( link ). When you input label appears and goes up...
asked by 29.03.2017 / 19:54
2
answers

Problems with If Else Statement chained in C language

I'm starting programming and I had a hard time understanding If Else in a chained way. I came across the following situation, when running the code only the first or second condition (If / Else) are possible to be true, regardless of the value...
asked by 24.08.2018 / 00:10
2
answers

(if / else if) with check box

I have the following problem: I have a decision structure that checks the check box. However, when I select the two boxes, the code still executes the commands that it checks if only one of the boxes has been selected, and with good reason, b...
asked by 17.12.2015 / 02:48