conditonal – POFTUT

Switch Case Statement in C/C++ Tutorial with Examples

Switch Case Statement in C/C++ Tutorial with Examples

C/C++ programming languages provides switch … case statement for selection according to given switch state. switch  … case can be used for different cases in order to control the flow of the application. Syntax switch … case has the following syntax. switch(EXPRESSION) {  case CONDITION1:    CASE1_CODE; break;  case CONDITION2:    CASE1_CODE; break; … default: … Read more

Javascript Decision Making with If-Else

Programs are mainly written on decisions. Decisions makes an application more flexible and rich. Javascript supports decisions too. A decision example might be like this: If person age above 17 set him adult. Single If We can define more complex decisions but for now we will look into simple decision. var age=19; if(age>17){ console.log(“You are … Read more

Python If-Elif-Else Multiple Conditionals Like And , Or

We have already looked if-elif-else statements in previously. if-elif-else requires conditions in order evaluate. These conditions may simple True , False or comparisons. The other way is we can define complex conditionals in order to evaluate. Simple Conditions Simple conditions are just single statement conditions where we do not need grouping or multiple or , and . We will just check … Read more

Python If .. Elif .. Else Statements and Conditionals

Decision making one of the fundamentals operations in programming languages and applications. We mostly use decisions to implements applications logic. The primary mechanism for decisions in Python is if..elif..else keywords. We can simple call them if-else . In this tutorial we will look different aspects and usage  examples of if-else. If If is used to check whether given … Read more

Powershell If-Elseif-Else Conditional Statement

Powershell is a really powerful scripting language. It provides  a lot of modern useful programming language features. It also have basic features like conditional statements like If . In this tutorial we will look syntax and use cases of If . If is used to check if specified condition/s are met and if the condition is … Read more