• Register

Recent questions tagged if-statement

0 votes
1 answer 5 views
Problem : ERROR : Cell contents assignment to a non cell array object
asked 6 days ago Shovo210 3.1k points
0 votes
1 answer 7 views
Problem : excel IF formula Error, “You've entered too many arguments”
asked Feb 15 Shovo210 3.1k points
0 votes
1 answer 7 views
Problem: I am a just a beginner Java programmer and I was just wondering if there is a way to end the program if the user input is false. Here is an example: if (age > 13) { System.out.println("You are eligible for this site, you may proceed. "); } else { // End program here if statement = false }
asked Feb 5 Ali 5.4k points
0 votes
1 answer 31 views
Problem: Hello all, I just recently started learning Java. In today&rsquo;s class, we learned about ternary operator and my teacher gave me an assignment in which I have to convert given if-else statement using ternary operator: if(number1<number2 && number1 < number3 ... out the smallest number"); I am unable to figure out how to change these statements using ternary operators. Can anybody help?
asked Nov 30, 2020 Code Learner 6.2k points
0 votes
1 answer 35 views
Problem: Hi! I am a newbie in the world of programming. I am learning decision constructs in C++. I came across following code on a website: #include<iostream> #include<string> using namespace std; int main() { float f = 0.1; if (f=0.1) ... used, but in this program, the programmer has used assignment operator in &lsquo;if&rsquo; statement. Can anybody please explain the program and output please?
asked Nov 29, 2020 Code Learner 6.2k points
0 votes
1 answer 67 views
Problem: I want to know the difference between | and ||, & and && in C++. What is the difference if I use the &lsquo;if&rsquo; condition as if(a == b || a == c) or if(a == b | a == c)? Please elaborate. Thanks
asked Oct 21, 2020 Code Learner 6.2k points
0 votes
1 answer 22 views
Problem: Hi there! I am working with a textbox in C# and I want to define multiple restrictions on this textbox through if statement. If I use nested ifs, my program becomes bulky. I want to keep my program as compact as possible. Attaching my code below. Please guide how I ... is " + Convert.ToInt32(nameTextBox.Text); } } I want to check if the text in the textbox is a number from 1 &ndash; 10.
asked Oct 15, 2020 Code Learner 6.2k points
0 votes
1 answer 50 views
Problem: I am very new to the Java. I am currently trying to understand the if statements in java. I have one doubt as follows if(a && b || c || d || e) then whether it will check (a && b) if a and b must be always true then only will it allow inside ... a && e))here if any of the conditions are true then will it allow inside ? Please guide me in solving my doubts related to if statements in java.
asked Jul 29, 2020 Raphael Pacheco 4.9k points
2 votes
2 answers 211 views
Problem: Hello all, I am a noob to this java programming. I started learning it a few days back. Re-type the code and fix any errors. the code should convert non-positive numbers to 1. As long as I understand this problem is sying to convert a negative number to ... but that&rsquo;s not enough for my case. If your understanding is up to this level, please pull me up from the grave LOL. Thanks.
asked Mar 19, 2020 Gavin 15.3k points
1 vote
1 answer 36 views
Problem: Let me put it as sim as I can. I have an if statement in my code and it returns a value. Since IF is a boolean statement it should return value whether it&rsquo;s true or false. So, in my program when a method tests an argument and returns a true or ... as a parameter in a different method inside an IF statement. How should I do that? Any kind of help is appreciated by my side. Thanks.
asked Mar 17, 2020 Gavin 15.3k points
0 votes
1 answer 267 views
Problem : I am very new to r programming. I have the array and I want to implement the below method: x<-function(b){ if (b>0){ b/sum(b) } else 1 } This method is written to check if there is any value which is larger than the 0 and if it says ... message: &ldquo;Warning message: r the condition has length > 1 and only the first element will be used&rdquo;. How can I fix the above error message?
asked Feb 24, 2020 mphil 2.3k points
0 votes
2 answers 460 views
Problem : I tried my Oracle code in different ways, like by taking out a while loop or a if loop, but when I put both loops together (if and while), I always face below error at the end. ERROR: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 13 06502. 00000 -  "PL/SQL: numeric or value error%s"
asked Jan 22, 2020 jwilliam 3.9k points
To see more, click for the full list of questions or popular tags.