Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Computer -- Hardware Key board Mouse Input Storage Area Program Storage Area Output Storage Area Working Storage Area Input Devices Monitor Printer Output Devices Primary or Main Memory (RAM) Register 1 Register 2 …… …… Register N Arithmetic and Logic Unit Secondary Storage Devices Micro Processor Algorithm: Step by step procedure of solving a particular problem. Pseudo code: Artificial informal language used to develop algorithms. Flow chart: Graphical representation of an algorithm. Algorithm to find whether a number even or odd: Step1: Begin Step1: START Step2: Take a number Step2: Read num Step3: if the number is divisible by2 then Step3: if(num%2=0) then print that number is even print num is even otherwise print that number is odd otherwise print num is odd Step4: End Step4: STOP (Algorithm in natural language) (Algorithm by using pseudo code) #include<stdio.h> #include<conio.h> main() { int num; printf(“Enter any number”); scanf(“%d”,&num); if(num%2==0) printf(“%d is even”,num); else printf(%d is odd”,num); } (Program in C language) start Flow chart: Yes read num If num If %2=0 No No print num is odd print num is even stop Flow chart symbols Oval Terminal Parallegram Input/output Rectangle Process Document Hard copy Diamond Decision Circle Connector Double sided Rectangle Sub program Hexagon Iteration Trapezoid Manual Operation Cylinder Magnetic Disk Storage Machine Language – Assembly Langu...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online