Function Program7

#include<stdio.h>

#include<conio.h>


void sum(int, int);


void main()

{

int a, b;

clrscr();


printf("\nEnter number1: ");

scanf("%d", &a);


printf("\nEnter number2: ");

scanf("%d", &b);


sum(a, b);

}


void sum(int x, int y)

{

int c;

c = x + y;


printf("\n\nYour sum is %d", c);

getch();

}

No comments:

Post a Comment