Write a program to find out the addition of three numbers.
Answers
Answered by
3
def add(nums):
_sum = 0
for n in nums:
_sum += n
return _sum
nums = [int(n) for n in input("enter 3 nums: ").split()]
print(f"sum: {add(nums)}")
Answered by
9
Explanation:
#include <stdio.h>
#include <conio.h>
sum ( int,int,int);
void main ( )
{
int a, b, c, d;
clrscr ( );
printf ( "\nACCEPT VALUE FOR a ,b)
scanf ("%d %d %d" , l& a, &b, &c);
d= sum ( a , b , c );
printf ( "\n Sum OF %d , %d and % d
getch ( );
}
sum ( int x , int y , int z )
{
int temp ;
temp= x+y+z ;
return ( temp );
}
Similar questions
Hindi,
2 months ago
Geography,
2 months ago
Math,
4 months ago
Chemistry,
9 months ago
Social Sciences,
9 months ago