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

TSDA Class Schedule List

Taieba Soft & Digital Academy (TSDA) www.tbsbd.blogspot.com Web Design Class No. Subject:-->HTML 1 Introduction of HTML,Basic Stru.HTML Elements, Defines Tag, Attributes and Text 2 Heading,Paragraph,Line Breaks, HTML Formatting,head tag(meta,style,js,title) 3 HTML Links, HTML Images, HTML link underline,Marquee,Images Mapping,Area 4 HTML lists(ol,ul,li), Nested List, menu_list,directory_list,defination_list 5 Audio,Video, Youtube Video,Mailto link 6 Table,th,tr,thead,tbody,tfoot, colspan and rowspan,nested table 7 Normal form, form alignment,fieldset,legend  8 Frame,Iframe, entites, color code, DTD and seo(meta) DreamWaver CS5 9 Dreamwaver Installation,How To use,Doctype,HTML Format,Version and  clasiffication CSS(Cascading Style Sheet) 10 Syntax,Classification, ID &Class, How to use ID ...