Flowchart Flowchart can said as a graphical representation of an algorithm. The only difference is you need to draw symbols in flowchart in the place of writing steps. 1. Graphical representation of any program is called flowchart. 2. There are some standard graphics that are used in flowchart as following: Figure: Start/Stop terminal box Figure: Input/output box Figure: Process/Instruction box Figure: Lines or Arrows Figure: Decision box Figure: Connector box Figure: Comment box Figure: Preparation box Figure: Separate box Write a algorithm to find out number is odd or even.
The constants are the values which never changes. The C uses following types of constants. Integer constants : Integer constants represent the whole numbers. They uses digits 0 to 9 and optional sign + or - before the number. The following are examples of valid integer constants. 123 -23 65535 0 +85 The space, comma and other special symbols are not allowed. The following are examples of invalid integer constants. 10,000 $500 15 780 Real Constant : Real Constants represent the numbers with fractional parts i.e digits after decimal point. They are used to represent contiguous quantities like temperature of day. The following are examples of valid real constants. 0.0005...
Definition: - Algorithm is a stepwise solution to any problem which is used in programming to create a knowledge of steps to write a program. 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 write the algorithm of that problem. As Algorithm goes in sequence it is written in steps for example: - Write a algorithm to find out number is odd or even? Ans. step 1 : start This Represents Starting of Algorithm. step 2 : input number This is for input which is inserted by user or given in program by default. step 3 : rem=number mod 2 rem is defined as variable which is storing the Result of number mod 2 step 4 : if rem=0 then print "number even" else ...
Comments
Post a Comment