Tag Archives: Loops

C Program to reverse a given number

In this example, you will learn to reverse the given number using these two methods. Examples : Input : 123 Output : 321 Input : 1995 Output : 5991 Approach used : We can reverse a number in c using loop and arithmetic operators. Take input number Find its quotient and remainder. Multiply the separate variable with 10… Read More »

Loops in C | Set 2

Loops are very useful when you want to perform a task repeatedly. Loops are used to execute a set of statements repeatedly until a particular condition is satisfied. A loop consists of two parts, a body of a loop and a control statement. The purpose of the loop is to repeat the same code a number of times.… Read More »