Sunday, August 15, 2021

50.10. Write a function that gets two integers and returns sum.

#include<stdio.h>

#include<conio.h>
int Sum(int a, int b)
{
int c;
c=a+b;
return c;
}
void main()
{
int x, y, s;
clrscr ();
printf ("Enter first number: ");
scanf("%d",&x):
printf ("Enter second number: ");
scanf ("&d", &y):
s=Sum(x, y);
printf ("Sum of %d and and is %d" is, x,y,s); 
getch ();
}