Algorithm For Compare two numbers #c

/* To display the largest one from given two numbers. */

1. Read the value of a and b.
2. if a>b then display a
       else display b

/* To display the smallest one from given two numbers. */ 


1. Read the value of a and b.
2. if a<b then display a
       else display b

Comments

Popular posts from this blog

Algorithm to display "n" natural numbers #c

Algorithm to display the sum of n natural numbers #c

Algorithm for Sum of two numbers