The for Loop in Java

A for circle is a reiteration control structure that permits you to effectively compose a loop that needs to execute a particular number of times. A for looping construct is helpful when you know how often an errand is to be rehashed. The syntax for the looping construct is as follows: The punctuation of a … Read more

C – for loop in C programming

A loop is used for executing a block of statements repeatedly until a given condition returns false. C For loop This is one of the most frequently used loop in C programming. Syntax of for loop: for (initialization; condition test; increment or decrement) { //Statements to be executed repeatedly } Flow Diagram of For loop … Read more

Write down the simple interest program using for loop in c

C Programming Tutorial

Here a C program to calculate simple interest using for loop. main ( ) { int p, n, count ; float r, si ; for ( count = 1 ; count <= 3 ; count = count + 1 ) { printf ( “Enter values of p, n, and r ” ) ; scanf ( … Read more

The For loop in C

C Programming Tutorial

For loop is probably the most popular looping instruction. The for allows us to specify three things about a loop in a single line: Setting a loop counter to an initial value. Testing the loop counter to determine whether its value has reached the number of repetitions desired. Increasing the value of loop counter each time the … Read more