by Dinesh Thakur Category: Functions



int average (int, int, int) ;
int main ()
             int a,b,c,r;
             cout<<"Enter three numbers :";
             cout<<"The average of three numbers is: "<<r;
          return 0;
              int average(int x,int y,int z)
                   int avg;
                           avg = (x+y+z)/3;
                   return avg;

demonstrate the concept of functions returning values

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.

Related Articles