if-statement

mercredi 17 février 2021

Why Does My if Statement Ignore the 1st if?

My code. When I run the code and select option 3, no matter the number I input, it always returns "No good, ...". My code works fine for option 2 and will give me the correct cout statement, so I don't understand what the problem is with my code in option 3, as they're basically the same. Someone please help me. Thank you in advance.

Publié par Unknown à 03:33
Envoyer par e-mailBlogThis!Partager sur XPartager sur FacebookPartager sur Pinterest
Libellés : Newest questions tagged if-statement - Stack Overflow

Aucun commentaire:

Enregistrer un commentaire

Article plus récent Article plus ancien Accueil
Inscription à : Publier les commentaires (Atom)

Qui êtes-vous ?

Unknown
Afficher mon profil complet

Archives du blog

  • ▼  2021 (6463)
    • ►  décembre (123)
    • ►  novembre (574)
    • ►  octobre (571)
    • ►  septembre (536)
    • ►  août (544)
    • ►  juillet (534)
    • ►  juin (553)
    • ►  mai (614)
    • ►  avril (598)
    • ►  mars (636)
    • ▼  février (558)
      • If, else if, else statements and logical operators...
      • Google App Script check if the edited cell contain...
      • I am getting error: 'else' without "if", why? [clo...
      • Return statement being skipped even though line ab...
      • Invalid Syntax while checking if skill list is empty
      • C# , how to make a Key word to fulfill specific co...
      • Need to make negative number recognise as a int, f...
      • How to alter a switch statement that essentially c...
      • VBA IF cell VALUE LENGTH criteria
      • Replace phone numbres
      • How to do an "if" command that is always checked i...
      • If metabox is emty display another content in word...
      • Autohotkey If Statement makes only one result
      • I can't figure out this while and if problem
      • How to make a Hangman by calling a method
      • how to write a python program that can tell whethe...
      • Outputs printed on same line - python
      • While-loop over dataframe running forever
      • Convert letters to numbers - python [duplicate]
      • I'm trying to make an if statements that sorts dif...
      • Excel COUNTIFS with merged cell
      • Setting two manual cutpoints in cutpointr (R)?
      • How to create a new column based on conditions in R
      • Checking if loop logic in calculator program with ...
      • Java "Syntax error on token "else", delete this to...
      • Calculate and Distinct count with filter in Power BI
      • I am new to programing with C# and have a very sim...
      • OR operator inside of If statements
      • C# (or any other code because the only needed is t...
      • How to sort tuples and eliminate similar ones?
      • Check if field is taken Tic Tac Toe java
      • Trying to put 2 images to over lap one another
      • nested if statement within a for loop doesn't work
      • Doesn't store entered value when runs second time
      • How to retry x times and put a long sleep with a p...
      • Why useless if statement is improving performance?
      • Not able to execute the following python code
      • Is there a way for me to pass parameters from one ...
      • How to create conditionals based on output of prin...
      • Javascript - Uncaught SyntaxError: Unexpected toke...
      • IF FUNCTIN IN VBA
      • How to double jump in checkers JAVASCRIPT
      • rearranging a char array with strncpy in C
      • Powershell to find folder/subfolder and then write...
      • How to change the textview height if it contains m...
      • If firestore doc.exists how do I stop execution of...
      • My code is running its course without user input
      • Transform IF statement into IF NOT statement (Java)
      • accessing updated variables outside of .then [dupl...
      • DiceRoll Switch statement / if statement working, ...
      • If Statements Overwriting Previous Setter
      • Conditional statement shortcut (python)
      • Python Error Message - IF STATEMENT SYNTAX ERROR [...
      • Problems with If and Switch Statements in a DiceRo...
      • How to generate an array of pseudo-random, unique,...
      • Multiple conditions inside IF statement refactoring
      • Merging two dateframes based on condition
      • if ternario does not work, function has value but ...
      • i am using for loop in object in javascript, but o...
      • Why is this code returning the else statement not ...
      • How can I convert this IF statement to use in VBA
      • can the JS decision making with 2 variables be red...
      • How to create a dummy variable based on other colu...
      • Comparing dates abap
      • Using a function that'll allow me to bold specific...
      • Finding integer divisors of a set of numbers in C ...
      • Main.java:12: error: missing return statement } ^ ...
      • Understanding a nested Conditional (ternary) operator
      • Adding Two Conditions to an IF Statement
      • Checking if either of two statements are true
      • Finding if the time is before or after another tim...
      • Unix replacing values with 2 conditions from 2 files
      • Set consecutive equal numbers in an array equal to...
      • What happens in an if statement then?
      • Is there a way to apply conditions in yaml file an...
      • Groovy doesn't like nested blocks of conditionals?
      • Flutter if conditions?
      • print 4 numbers (that is divisible by 3 and 6) bef...
      • Out of range. How to add the remainder of list to ...
      • Hacer que un menú funcione en python
      • Python simple not in statement not working [duplic...
      • How do I use the #if directive
      • Mime Multipart Email HTML Python | SyntaxError: 'r...
      • Without removing i would like to subset the rows i...
      • R - How to use ifelse() and substr() to extract sp...
      • Need Help - Java simple regular shape area calcula...
      • How to use an if else statement and not apply it o...
      • Is there any better way to write blank if-else sta...
      • Why my if else statement is not working in pyqt5 q...
      • SALESFORCE : Email template conditional field not ...
      • Compare two dictionary lists, based on specific key
      • Use jQuery code IF ELSE into element Find() if I u...
      • check if clone is equal to original thing Unity
      • Nesting ifelse in R to mutate across multiple columns
      • How can I hide comment count in the wordpress loop...
      • Can I apply consistent sample numbers using group_...
      • Trouble with storing random number and Yes No loop
      • How to use python if command Between 2 poin [closed]
      • Python if-condition import json file base on diffe...
      • why is this code (if-elif) statement returning a s...
    • ►  janvier (622)
  • ►  2020 (7112)
    • ►  décembre (556)
    • ►  novembre (593)
    • ►  octobre (562)
    • ►  septembre (616)
    • ►  août (565)
    • ►  juillet (627)
    • ►  juin (614)
    • ►  mai (562)
    • ►  avril (671)
    • ►  mars (617)
    • ►  février (594)
    • ►  janvier (535)
  • ►  2019 (6304)
    • ►  décembre (537)
    • ►  novembre (597)
    • ►  octobre (590)
    • ►  septembre (532)
    • ►  août (493)
    • ►  juillet (468)
    • ►  juin (437)
    • ►  mai (489)
    • ►  avril (486)
    • ►  mars (633)
    • ►  février (548)
    • ►  janvier (494)
  • ►  2018 (6255)
    • ►  décembre (494)
    • ►  novembre (616)
    • ►  octobre (641)
    • ►  septembre (553)
    • ►  août (507)
    • ►  juillet (560)
    • ►  juin (310)
    • ►  mai (449)
    • ►  avril (558)
    • ►  mars (580)
    • ►  février (506)
    • ►  janvier (481)
  • ►  2017 (7267)
    • ►  décembre (518)
    • ►  novembre (605)
    • ►  octobre (614)
    • ►  septembre (573)
    • ►  août (539)
    • ►  juillet (580)
    • ►  juin (615)
    • ►  mai (645)
    • ►  avril (661)
    • ►  mars (631)
    • ►  février (650)
    • ►  janvier (636)
  • ►  2016 (7346)
    • ►  décembre (559)
    • ►  novembre (635)
    • ►  octobre (712)
    • ►  septembre (584)
    • ►  août (576)
    • ►  juillet (532)
    • ►  juin (565)
    • ►  mai (601)
    • ►  avril (676)
    • ►  mars (654)
    • ►  février (635)
    • ►  janvier (617)
  • ►  2015 (7558)
    • ►  décembre (623)
    • ►  novembre (703)
    • ►  octobre (716)
    • ►  septembre (649)
    • ►  août (577)
    • ►  juillet (595)
    • ►  juin (617)
    • ►  mai (575)
    • ►  avril (638)
    • ►  mars (701)
    • ►  février (592)
    • ►  janvier (572)
  • ►  2014 (161)
    • ►  décembre (161)
Thème Awesome Inc.. Fourni par Blogger.