C PROGRAMMING

write a c program to add two numbers using functions

#include<stdio.h>
#include<conio.h>
sum(int x, int y)
{
int z;
z=x+y;
printf("sum=%d",z);
}

main()
{
int a,b;
printf("Enter first numbern");
scanf("%d",&a);
printf("Enter second numbern");
scanf("%d",&b);
sum(a,b);
getch();
}
Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button