Questions tagged as 'if'

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

PHP: Function as condition for an if

I wonder if you can use a function as a condition for a if . Example: function estaParaExpirar($data, $dias) { return(strtotime($data) < strtotime("+".$dias."days") ); } if estaParaExpirar($row[11], "10") { Echo "..." }...
asked by 07.08.2014 / 12:55
1
answer

Initial condition (IF) does not work

I'm trying to play a game of old. So far I have been able to make the markings alternating with each shift and the function to delete the markings. ps: I'm using black and red instead of ball and "x". My problem is that the markup changes...
asked by 10.11.2014 / 23:21
2
answers

Algorithm implementation in VisuAlg [closed]

Make a program that receives two numbers and performs one of the operations listed below according to the user's choice. If an invalid option is entered it will show error message and finish running the program. The options are: 1. Average betwe...
asked by 10.09.2017 / 03:58
1
answer

Difficulties with IF

Good morning, guys. I am still new to programming, I am trying to write a simple program, which calculates the coefficient of performance and report the percentage of the finished course, but I am having problems with an if conditional that is n...
asked by 28.12.2018 / 14:48
3
answers

Checkbox error

I need to make a while in PHP : while($lo = mysql_fetch_array($ro)) { $id3 = $lo["id"]; $nome_menor = utf8_encode($lo["nome_menor"]); That's okay! Showing the companies listed in the query below: $ro = mysql_query(...
asked by 16.06.2016 / 16:25
2
answers

Check if $ _GET exists within the view

Galera is as follows, I have a standard html file, which contains: <header data-color="<?php echo $client->client_color; ?>"> <h1> <?php if($client->client_image != ''): ?> <img src="<?php echo...
asked by 19.03.2015 / 20:41
1
answer

CONDITIONS IF STRUCTURE and an if inside another

How is the structure to put 2 conditions in the IF? if (digitalRead (0 & 1), HIGH) would look like this And can I put an if inside another? for example '' if the sensor1 is high climb claw, (if it has climbed up) if sensor 2 is high...
asked by 29.11.2017 / 05:28
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