Skip to main content

Posts

Showing posts with the label C

Greatest of Four Number using Functions in C Programming

                        Hello everyone, this blog is to find the greatest of four numbers and we i am using the functions concept for this program. First we need a function named max_of_four(), and that accepts four number as parameter named a, b, c, d.                                   Our function is a combination of two greatest of two numbers, and it checks first two number and return the greatest then returns the greatest of next two numbers. This function is called form the main function and there   we get all inputs from the user. Code: # include  <stdio.h> int  max_of_four( int  a, int  b, int  c, int  d) {      int  max,max1;     //max of a and b      if (a>b)     { ...