write a C language program having function name "Add" which performs addition among three numbers.
Answers
Answered by
1
#include <stdio.h>
int Add(a, b, c) {
return a+b+c;
}
void main() {
int a,b,c;
scanf("%d%d%d",a,b,c);
int sum = Add(a,b,c);
printf("%d",sum);
}
Answered by
1
Question:-
Write a C language program having function name "Add" which performs addition among three numbers.
Code:-
Here is your code.
#include <stdio.h>
int Add(int a, int b, int c) {
return (a+b+c);
}
void main()
{
printf("Enter three numbers...\n");
scanf("%d%d%d",a,b,c);
int s=Add(a, b, c);
printf("Sum is: %d",s);
}
Similar questions
Math,
3 months ago
Art,
3 months ago
Math,
3 months ago
Social Sciences,
7 months ago
India Languages,
7 months ago
Geography,
11 months ago
Science,
11 months ago