CODING:
#include<stdio.h>
#include<conio.h>
main()
{
int sum(int,int),num1,num2,add;
clrscr();
printf("Enter first number: ");
scanf("%d",&num1);
printf("Enter second number: ");
scanf("%d",&num2);
add=sum(num1,num2);
printf("\n\nSum of %d and %d is= %d",num1,num2,add);
getch();
}
int sum(int n1,int n2)
{
return(n1+n2);
}
#include<stdio.h>
#include<conio.h>
main()
{
int sum(int,int),num1,num2,add;
clrscr();
printf("Enter first number: ");
scanf("%d",&num1);
printf("Enter second number: ");
scanf("%d",&num2);
add=sum(num1,num2);
printf("\n\nSum of %d and %d is= %d",num1,num2,add);
getch();
}
int sum(int n1,int n2)
{
return(n1+n2);
}
CODING |
OUTPUT |
For any query or suggestion please comment below...
No comments:
Post a Comment