9
TWO
You find the sum of two numbers by adding the two together. Example: The sum of 1 + 1 is 2
The sum of a fraction? Well, to find the sum of the fraction all you do is divide both top and bottom numbers.
missing addend
9
If you have the length and the width, add them together and double that sum.
Add the lengths of any two adjacent sides, and double the sum.
public static final double getAverage(final int[] ns) { if (ns.length == 0) { return 0.0; } int sum = 0; for (int n : ns) { sum += n; } return ((double) sum) / ns.length; }
#include<stdio.h> void main() { int num, sum=0, i; printf("Enter ten numbers: \n"); for(i=0;i<10;i++) { scanf("%d",&num); sum += num; } printf("\n The sum of the numbers is %d",sum); getchar(); }
Shell problems are programs that can be run to find out information about numbers. The problem can help find an even or odd number, or what the sum of a cube is.
Multiply sum by 2.
Use the fact that the sum of the three angles is 180 degrees.Use the fact that the sum of the three angles is 180 degrees.Use the fact that the sum of the three angles is 180 degrees.Use the fact that the sum of the three angles is 180 degrees.
Let's assume that you want the sum of the general harmonic series: sum(n=0,inf): 1/(an+b) Since we know that the harmonic series will converge to infinity, we'll also assume that you want the sum from 0 to n. double genHarmonic(const double n, const double a, const double b) { double sum = 0.0; // perform calculations int k; for(k = 0; k <= n; ++k) { sum += 1.0 / (a * k + b); } return sum; }
-4
TWO
import java.util.Scanner;public class average {static int i=0;static double sum = 0;static double average = 0;public static double calcSum(double sum){double count;Scanner input = new Scanner(System.in);while(i < 5){count = input.nextDouble();sum = sum + count;i++;}return sum;}public static double calcAverage(double average){double sum = calcSum(sum);average = calcSum(sum) / 5;return average;}public static void main(String[] args) {System.out.println("Please enter 5 numbers.");System.out.println("Sum is: "+calcSum(sum));System.out.println("Average is: "+calcAverage(average));}}