There is no algorithm. To add two numbers just put a + between them.
int a = 1 + 2;
Wiki User
∙ 2009-01-28 22:36:021. Design an algorithm to compute sum of the squares of n numbers?
CLS: DEFINT SUM: SUM = 0 FOR K = 1 to N SUM = SUM + N NEXT K PRINT "The sum of the first "; N; "natural numbers is "; SUM; ".": PRINT PRINT "You're welcome. The pleasure is ours. Drop in any time." END
Algorithm in C Language:int *a,*b; //Declaraction of the two pointersint sum;scanf("%d%d",a,b); //Reading values of the 2 variablessum=*a+*b;printf("SUM = %d",sum);
To find the average of n numbers, sum the numbers and divide the sum by n. Thus for 4 numbers, divide their sum by 4.
Algorithm for average of 3 numbers:Sum the 3 numbers.Divide the sum by 3.
1. Design an algorithm to compute sum of the squares of n numbers?
CLS: DEFINT SUM: SUM = 0 FOR K = 1 to N SUM = SUM + N NEXT K PRINT "The sum of the first "; N; "natural numbers is "; SUM; ".": PRINT PRINT "You're welcome. The pleasure is ours. Drop in any time." END
Algorithm in C Language:int *a,*b; //Declaraction of the two pointersint sum;scanf("%d%d",a,b); //Reading values of the 2 variablessum=*a+*b;printf("SUM = %d",sum);
To find the average of n numbers, sum the numbers and divide the sum by n. Thus for 4 numbers, divide their sum by 4.
Yes. You know this is true because you learned a process-- an "algorithm"--for adding two numbers together, and if you start with two whole numbers, the result is also a whole number.
The sum of the first 50 natural numbers is 1,251.
Algorithm for average of 3 numbers:Sum the 3 numbers.Divide the sum by 3.
TO find the sum of n numbers?
The sum of the first 200 natural numbers is 20,001.
Start print "the sum of all even numbers is infinite" end
jgfujtf
The sum is infinite