Skip to main content

Program_function_02


Adding two Integer number using Function.

/* Adding two Integer number using Function.*/
 #include <stdio.h>
int sum( int x, int y); /* function prototype */
int sub( int x, int y);
int mul( int x, int y);
int div( int x, int y);
 /* function main begins program execution */
 void main( )
 {
    sum (5,7);
    sub (10,5);
    mul (10,5);
    div (10,5);

 } /* end main */
/* Function maximum definition */
/* x, y and z are parameters */
int sum( int x, int y)
{
    printf ("%d", x+y);
    getch();
} /* end function maximum */
int sub( int x, int y)
{
    printf ("%d", x-y);
    getch();
}
int mul( int x, int y)
{
    printf ("%d", x*y);
    getch();
}
int div( int x, int y)
{
    printf ("%d", x/y);
    getch();
}
Output:


Comments

Popular posts from this blog

Professional WordPress

Professional WordPress: Design and Development, 2nd Edition Brad Williams, David Damstra, Hal Stern     WordPress is the most popular self-hosted open source website software in use today, and the latest version makes it even simpler to operate. Packed with real-world examples for load balancing and multiusers, this esteemed resource replaces some of the more basic material with more advanced content. Every single chapter has been reworked to provide the most current and proper methods for developing and designing in WordPress. Coverage of HTML5, CSS3, and JavaScript and new chapters on custom post types, custom taxonomies, Multisite, and extensions of themes bring the content of this book completely up-to-date and provides you with all you need to deploy successful WordPress sites.      

Joomla Video Tutorials-03

How to install Joomla Locally     3. Installing Joomla