#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int add(int a,int b);
void main()
{
int a1,b1;
int sum=0;
clrscr();
printf("Enter value of a:- ");
scanf("%d",&a1);
printf("\nEnter value of b:- ");
scanf("%d",&b1);
sum=sum+add(a1,b1);
printf("\nSum of a and b:- %d",sum);
getch();
}
int add(int a,int b)
{
int c;
c=a+b;
return (c);
}
#include<conio.h>
#include<stdlib.h>
int add(int a,int b);
void main()
{
int a1,b1;
int sum=0;
clrscr();
printf("Enter value of a:- ");
scanf("%d",&a1);
printf("\nEnter value of b:- ");
scanf("%d",&b1);
sum=sum+add(a1,b1);
printf("\nSum of a and b:- %d",sum);
getch();
}
int add(int a,int b)
{
int c;
c=a+b;
return (c);
}
No comments:
Post a Comment