C++ While Loop

A while loop is a straightforward loop and is also an entry-control loop. It evaluates the condition before executing the block of the loop. If the condition is found to be true, only then the body of the loop is …

Read moreC++ While Loop

C++ for Loop

The for loop has a more efficient loop structure and is an entry-control loop. The loop allows the programmer to write the execution steps together in a single line and also the specific number of times the execution is to be iterated. …

Read moreC++ for Loop

C# if statement

An if statement consists of a Boolean expression followed by a block of codes. If the Boolean expression is true, the block of code inside the if statement will be executed else if statement will be skipped. This is the simplest one …

Read moreC# if statement