// Input value is usernum.
// This code snippet sums 1 + 3 + 5 + ... + usernum
// The answer is stored in the variable summedvalue.
N = (int) (usernum+1)/2; // maximum number of integers to be summed
int *v = malloc(N*sizeof(int)); // allocate storage for array v
// Calculate the number of loop counts and assign array v..
count = 0;
k = 1;
while (1) {
if (k>usernum) { // do not extend v beyond usernum
break;
}
v(count) = k; // assign an odd integer to v, including usenum
count++;
k += 2; // k is an odd number
if k>usernum { // handle usernum as odd or even
k = usernum;
}
}
n = count; // the size of array v.
// Calculate the sum in a for loop
summedvalue = 0; // initialize summedvalue
for (i=0; i<=n; i++) {
summedvalue += v(i);
}
Answer:
-108
108
Step-by-step explanation:
Since it is withdrawing, we are taking away -$18 every day for 6 days.
(-18)*6 = -108
Since it is deposits, we are adding to the amount in her account, +$18 for 6 days.
18*6 = 108
The difference is that one is taking away and one is adding each day, resulting in negative or positive change.
Well we can find the perimeter by using the formula P=2L + 2W
P=2(30) + 2(18) P=60+36 P=96
I believe we can divide the perimeter by 18 to find the total amount of lights needed.
96÷18=5.333333
So we know at least 5 lights are needed.
I'm not sure if I'm correct, but I hope this helped anyways :)
Answer:
A
Step-by-step explanation:
A because 16(x + y) = (16x + 16y)
Answer:
6500
Step-by-step explanation:
6700-200= 6500
6500 ft above sea level