#include <stdio.h>
#include <conio.h>
int sum(int a,int b);
main()
{
int z,y,x;
printf("Enter the number: ");
scanf("%d",&x);
printf("Enter the 2nd number: ");
scanf("%d",&y);
z=sum(x,y);
printf("%d",z);
}
//main method end..............
int sum(int a,int b)
{
return a+b;
}
----------------------------------------------------------------------------------------------------------------
#include <stdio.h>
#include <conio.h>
void sum(int a,int b);
main()
{
int y,x;
printf("Enter the number: ");
scanf("%d",&x);
printf("Enter the 2nd number: ");
scanf("%d",&y);
sum(x,y);
//printf("%d",z);
}
//main method end..............
void sum(int a,int b)
{
printf("%d",a+b);
}
No comments:
Post a Comment