Skip to content

Tag Archives: loop

Pre-requisite: if-else This article focuses on discussing what happens when the print statement is used inside the if-else conditional statement. For example: Consider the below… Read More
Rahul and Ankit are the only two waiters in the Royal Restaurant. Today, the restaurant received N orders. The amount of tips may differ when… Read More
In this article, we will discuss the overview of TCL script and will cover the TCL script to find the sum of n natural numbers… Read More
In this article, we will know the syntax of the if-else statement in Tool Command Language. We will understand the TCL script to determine whether… Read More
In this, we will cover the overview of MySQL WHILE Loop and then will cover the algorithm of each example and then will see the… Read More
Given an array A[] consisting of positive integers, the task is to calculate the minimum possible deviation of the given arrayA[] after performing the following… Read More
Exit a Loop in C++: If the condition of an iteration statement (for, while, or do-while statement) is omitted, that loop will not terminate unless… Read More
Given a number N, the task is to print the star pattern in single loop. Examples:  Input: N = 9 Output: * * * *… Read More
Sentinel Controlled Loop A sentinel controlled loop is also called an indefinite repetition loop because the number of iterations is not known before the loop… Read More
Range-based for loops is an upgraded version of for loops. It is quite similar to for loops which is use in Python. Range-based for loop… Read More
Write a program that checks whether a given Linked List contains a loop and if a loop is present then returns the count of nodes… Read More
Nested loop means a loop statement inside another loop statement. That is why nested loops are also called as “loop inside loop“. Syntax for Nested… Read More
for loop: for loop provides a concise way of writing the loop structure. Unlike a while loop, a for statement consumes the initialization, condition and… Read More
for loop: for loop provides a concise way of writing the loop structure. Unlike a while loop, a for statement consumes the initialization, condition and… Read More
Given an integer K, the task is to find the length of the smallest no. N which is divisible by K and formed by using… Read More