




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Introduction Problem solving is a process of transforming the description of a problem into the solution of that problem by using our knowledge of the problem domain and by relying on our ability to select and use appropriate problem-solving Strategies, Techniques and Tools.
Problem Definition The computer is the symbol-manipulating machine that follows the set of instructions called a program. A problem is a task to be performed. It is best thought of in terms of inputs and matching outputs. A problem definition should not include any constraints on how the problem is to be solved. Any computing has to be performed independently without depending on the programming language and the computer.
Problem Solving Techniques The problem solving techniques involves the following steps: ļ¼ Define the problem ļ¼ Formulate the mathematical model ļ¼ Develop the algorithm ļ¼ Write the code for the problem ļ¼ Test the program
Problem Solving Techniques Any technical problem provided can be solved mathematically. Full knowledge about the problem should be provided along with the underlying mathematical concept. Example: Data 1 + Data 2 / 2 (Data 1 + Data 2 ) / 2 Formulate Mathematical Problem
Problem Solving Techniques āA step by step process is known as the algorithm.ā An algorithm is any well-defined computational procedure that takes a value or set of values as input and produce an output. The algorithm is very important for programmers. Algorithm
Algorithm Algorithm for adding two numbers Step ā 1 - START Step ā 2 - Input A and B Step ā 3 - C = 0 Step ā 4 - C = A + B Step ā 5 - Print C Step ā 6 - END Design
Algorithm An algorithm to convert temperature from Centigrade to Fahrenheit Step ā 1 - START Step ā 2 - Input C Step ā 3 - F = 0 Step ā 4 - F = 9 * C / 5 + 32 Step ā 5 - Print F Step ā 6 - END Design
Flowchart Symbols Symbols Meaning Symbols Meaning Terminal Start / End Decision Making Processing Input / Output Document / Hard Copy Storage Disk Connector Different page connector
Flowchart Diagram
Program Definition A program consists of a series of instructions that a computer processes to perform the required operation. Set of computer programs that describe the program are called software. The process of software development is called Programming and the person who creates the computer programs is called Programmer. A program is a set of instruction written by the programmer. A collection of a programs are known as software.
Program Requirements Thus, in order to design a program, a programmer must determine three basic requirements: ļ¼ The instructions to be performed. ļ¼ The order in which those instructions are to be performed. ļ¼ The data required to perform those instructions.
Program Example^ -^1 #include int main() { int A, B, C = 0 ; printf("Enter A = "); scanf("%d",&A); printf("Enter B = "); scanf("%d",&B); C = A + B; printf("Sum C = %d",C); return 0 ; }
Enter A = 20 Enter B = 10 Sum C = 30
Program Characteristic Any computer program should have the following characteristics. ļ¼ Accuracy ā Any calculation made in the program should be correct and accurate. ļ¼ Clarity ā It refers to the overall readability of the program which helps the user to understand the underlying program logic easily without much difficulty. ļ¼ Modularity ā When developing any program, the task is divided into several modules or subtasks. These modules are developed independently i.e. each task does not depend on the outer task.