Skip to main content

Posts

Showing posts with the label Flowchart

Control Statements: Loops in C programming

Loops are used when we want to execute a part of program or block of statement several times. So, a loop may be defined as a block of statements which are repeatedly executed for a certain number of times or until a particular condition is satisfied. There are three types of loop statements in C: 1. For 2. While 3. Do...while Each loop consists of two segments, one is k/a the control statement and the other is the body of the loop. The control statement in loop decides whether the body is to be executed or not. Depending on the position of control statement in the loop, loops may be classified either entry_controlled loop or exit_controlled loop. While and For are entry_controlled loops where as do...while is exit_controlled loop. For Loop : For loops is useful to execute a statement for a number of times. When the number of repetitions is known in advance, the use of this loop will be more efficient. Thus, this loop is also known as determinate or definite loop. ...

Problem Solving Using Computer

Before writing a computer program, we must be clear about the processing steps to be performed by the computer. Hence, in order to ensure that the program/instructions are appropriate for the problem and are in the correct sequence, program must be planned before they are written. The problem solving contains a number of steps which are as below.    Steps in problem solving by Computer 1)       Problem Analysis:                 Before solving a problem, it should be analyzed well. It is impossible to solve a problem by using computer without clear understanding & identification of the problem. Thus, problem analysis contains different activities like determining input/output, software and hardware requirement, time constraints, different types of users, accuracy etc.  2)       Algorithm Development:     ...