Questions tagged [if-statement]

An "if" statement is a control structure in many programming languages that changes the execution flow depending on a condition. Also Include an appropriate language tag such as "java" if your question is language-specific.

0
votes
1answer
21 views

adding an if/else to change contents in the comparison table using ajax

Thanks for stopping by. i need little help with this program/application that I'm trying to create. It is a web app which displays the various results from an XML using ajax. Following is the program ...
0
votes
1answer
49 views

c: last loop in if elseif else is not working

I'm trying to solve an error on the loop in code below but I can't figure out why it won't go again in first "if", after in last "else" ("Introduceti d sau n! "), I write 'n'. The 'd' is working fine ...
0
votes
1answer
15 views

Print or display an image url as the consequent of a conditional statement in the most introductory way / level in JavaScript

The answer to this question should be fairly simple since it is for a project in an introduction to the Javascript portion of an "Internet and Web Programming" course. (The instructor said it is okay ...
0
votes
0answers
19 views

VBA, Building if-then when cell value does not equal string

I'm moving data from one sheet to another but only when the cell value in a given column is not "In Progress". I've tried a number of ways to do this (InStr, Len, etc.) but I'm struggling to make it ...
0
votes
1answer
14 views

How to determine which expression is true when multiple expressions are checked in an if statement

I was wondering (pretty much just out of curiosity) if there's a way in jquery to determine, in an if statement with multiple checks like this oneif (expression1 || expresison2 || expression3){.....
-1
votes
2answers
49 views

Function is not returning expected result

I have created function below which should return the status based on two inputs, but it always ends up in the last if statement. I can't figure out why it's ending in the last one. If I comment the ...
0
votes
0answers
17 views

subsequent php array problem when creating next request to server

This script working fine for me but Only issue I can see is that the proxies stop generating after hitting a254, and it won’t jump to the next server. So you if you’re on a230 and generate 50 it stops ...
-6
votes
2answers
61 views

Using java if-else [on hold]

This is my first time to use stack overflow to ask a question. I'm a beginner of Java programming. I was stuck on my assignment, can anyone help me to solve?So, the problem is using java if-else to ...
1
vote
2answers
49 views

Assignment in if clause has no effect

Consider the following code (I realize it's bad practice, just curious to see why it happens):#include <iostream>int main() {bool show=false;int output=3;if (show=...
-3
votes
0answers
30 views

How can i fix the program [on hold]

I have a small rock-paper game. When I run it, computer like don't see 4th and 5th elements of array, even when I win, program output is: "computer win". Please help me find a mistake in this code, ...
1
vote
3answers
76 views

Multiple if statements - can “else” still be used?

I'm trying to write a multiple if statements to check if a password meets all conditions, rather than using an if-elif statement which works but only verifies one condition at a time.My code doesn't ...
0
votes
1answer
46 views

Simple for loop, if statement and output message

I think this one is pretty simple, but I am new to this, so I am not sure where to go from here :)I have a Google Sheet, with some data (pretty large sheet). I want a script that check whether the ...
0
votes
1answer
58 views

I need help getting my java if statement to work

I am very new to learning java and currently I am working on a program that lets me fight the computer based on simple stats that I have assigned us and a random number to function as a dice roll. I ...
0
votes
2answers
47 views

C++ If/Else statements getting skipped

I am writing a Craps program as a school assignment. In this code, no matter what the dice roll is, the program skips over all the "if" blocks and continues past the last line in this snippet. The ...
0
votes
0answers
46 views

Why is my if statement skipping straight to else [duplicate]

I'm quite new to C so sorry if this is simple or has already been answered, the error message i received is "warning: comparison between pointer and integer if (guess=="y") {"#include <stdio.h&...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,