jagomart
digital resources
picture1_Machine Language Pdf 188343 | Olevel 2 Clang 19mar


 142x       Filetype PDF       File size 0.09 MB       Source: www.nielit.gov.in


File: Machine Language Pdf 188343 | Olevel 2 Clang 19mar
programming and problem solving through c language o level a level chapter 1 introduction to programming basic model of computation problem definition a problem definition involves the clear identification of ...

icon picture PDF Filetype PDF | Posted on 02 Feb 2023 | 2 years ago
Partial capture of text on file.
        
       Programming and Problem Solving through C Language 
       O Level / A Level 
        
       Chapter -1 : Introduction to Programming 
        
        
       Basic Model of Computation 
        
        
       Problem definition: 
          
         A problem definition involves the clear identification of the problem in terms of available 
         input parameters and desired solution. 
        
       Approach towards solving the problem: 
          
         After a problem is identified, the user needs to implement a step-by-step solution in terms of 
         algorithms. 
        
       Graphical representation of problem solving sequence: 
          
         This step involves representing the steps of algorithm pictorially by using a flowchart. 
          
         Each component of the flowchart presents a definite process to solve the problem. 
        
       Converting the sequence in a programming language: 
          
         Converting  the  graphical  sequence  of  processes  into  a  language  that  the  user  and  the 
         computer can understand and use for problem solving is called programming. 
          
         After the program is compiled the user can obtain the desired solution for the problem by 
         executing the machine language version of the program. 
        
        
       Algorithm 
        
        
       A sequential solution of any program that written in human language, called algorithm. 
        
       Algorithm is first step of the solution process, after the analysis of problem, programmer writes 
       the algorithm of that problem. 
        
        
        
        
        
        
        
       Example of Algorithm  : 
           
       1.   Write an algorithm to add two numbers entered by the user. 
        
       Step 1: Start 
       Step 2: Declare variables num1, num2 and sum.  
       Step 3: Read values num1 and num2.  
       Step 4: Add num1 and num2 and assign the result to sum. 
               sum←num1+num2  
       Step 5: Display sum  
       Step 6: Stop 
        
       2.   Write an algorithm to find the largest among three different numbers entered 
       by the user. 
        
       Step 1: Start 
       Step 2: Declare variables a,b and c. 
       Step 3: Read variables a,b and c. 
       Step 4: If a > b 
                  If a > c 
                     Display a is the largest number. 
                  Else 
                     Display c is the largest number. 
               Else 
                  If b > c 
                     Display b is the largest number. 
                  Else 
                     Display c is the greatest number.   
       Step 5: Stop 
        
        
        
       Assignment 
        
       Q. 1.  Write an algorithm to find the area of a rectangle. 
                            Area = Length X Width 
        
       Q.2 Write an algorithm to find the area of Circle. 
                         Area = 22/7 *radius * radius 
        
       Q.3 Write an algorithm to calculate the Simple Interest , after reading the Principal Amount , 
       Rate of Interest and Time . 
The words contained in this file might help you see if this file matches what you are looking for:

...Programming and problem solving through c language o level a chapter introduction to basic model of computation definition involves the clear identification in terms available input parameters desired solution approach towards after is identified user needs implement step by algorithms graphical representation sequence this representing steps algorithm pictorially using flowchart each component presents definite process solve converting processes into that computer can understand use for called program compiled obtain executing machine version sequential any written human first analysis programmer writes example write an add two numbers entered start declare variables num sum read values assign result display stop find largest among three different b if number else greatest assignment q area rectangle length x width circle radius calculate simple interest reading principal amount rate time...

no reviews yet
Please Login to review.