Question

For the following SAS code, what initial value of the sum variable gives the sum variable...

For the following SAS code, what initial value of the sum variable gives the sum variable a final value of 10 once the 3 iterations of the do-loop are complete?

sum= '......................'

do i= 1 to 3;

sum=sum+i

end;

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
For the following SAS code, what initial value of the sum variable gives the sum variable...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • A) The following code fragment takes as input a number in t1 and produces a value...

    A) The following code fragment takes as input a number in t1 and produces a value in register $s2. Assume that initially $s2 equals zero. Line Loop: addi $t2, $zero, 10 2 Loop2: addi$s2, $s2, 2 3 subi $t2, $t2, 1 4 bne $t2, $zero, Loop2 5 subi $t1,$t1, 1 6 bne $t1, $zero, Loop For each of the following problems, justify your answers and show your calculations clearly. Final answers without justifications are not accepted. What is the final...

  • Write code that sets the value of a variable named result to the sum of the...

    Write code that sets the value of a variable named result to the sum of the values in the variables num1 and num2, unless that sum is in the range 20 to 30, inclusive, in which case set result to 0. Assume num1 and num2 already have values (code in Python).

  • USING MATLAB. Design a program which uses a for…end loop to add 10 to a variable...

    USING MATLAB. Design a program which uses a for…end loop to add 10 to a variable V five times. Use a counter variable to count the number of iterations that pass and display this count after the program exits the loop. To design your program, create a flow chart and iteration table (choose he starting variable V = 20). Once it is designed, code it and step through the loop to confirm your iteration table.

  • 2. What is the output of the following code fragment? n = 1; while (n <=...

    2. What is the output of the following code fragment? n = 1; while (n <= 5) { n++; cout << n << ' '; a.1 2 3 4 5 b. 1 2 3 4 c. 1 1 1 forever d. 2 3 4 5 e. 2 3 4 5 6 3. What is the termination condition for the following While loop? while (beta > 0 && beta < 10) { cout << beta << endl; cin >> beta; }...

  • I need this code in java. Loops do just what they sound like they should -...

    I need this code in java. Loops do just what they sound like they should - they perform a statement again and again until a condition is fulfilled. For this lab you will be practicing using loops, specifically a for loop. The for loop takes the form of: for(/*variable initialization*/;/*stop condition*/; /*increment*/){ //statements to be done multiple times } Task Write an application that displays every perfect number from 2 through 1,000. A perfect number is one that equals the...

  • Consider the following incomplete code segment, which is intended to print the sum of the digits...

    Consider the following incomplete code segment, which is intended to print the sum of the digits in num. For example, when num is 12345, the code segment should print 15, which represents the sum 1 + 2 + 3 + 4 + 5. int num = 12345; int sum = 0; /*  missing loop header */ { sum += num % 10; num /= 10; } System.out.println(sum); Which of the following should replace /* missing loop header */ so that the...

  • 3) Examine the following code. What will be the value of the variable Y? Dim X,...

    3) Examine the following code. What will be the value of the variable Y? Dim X, Y As Integer X=100 Select Case X Case Is < 0 Case 0 Y = 10 Case 1 to 50 Y = 15 Case Is < 100 Y= 20 Case Else Y = 25 End Select Answer:

  • Do a trace on the code below. In the method binarySearch below: variable key holds the...

    Do a trace on the code below. In the method binarySearch below: variable key holds the value 27, and variable list is a reference to an array with these values {12, 25, 36, 39, 43, 65, 78, 86, 99, 108, 121}. public static int binarySearch(int[] list, int key) {     int lowIndex = 0;     int highIndex = list.length - 1;     while (highIndex >= lowIndex) {       int midIndex = (lowIndex + highIndex) / 2;       if (key <...

  • Need help with SAS question: What does the following SAS code do? PROC MEANS DATA = MYLIB.SOMEDATA; RUN; Produces a five...

    Need help with SAS question: What does the following SAS code do? PROC MEANS DATA = MYLIB.SOMEDATA; RUN; Produces a five-number summary from the permanent dataset SOMEDATA. Produces mean and standard deviation from the permanent dataset SOMEDATA. Produces mean, standard deviation, minimum, and maximum from the temporary dataset SOMEDATA. Produces mean, standard deviation, minimum, and maximum from the permanent dataset SOMEDATA.

  • How do I go about solving this problem in R? # This is a challenge. Essentially,...

    How do I go about solving this problem in R? # This is a challenge. Essentially, you will use loops to calculate the # sum of the sequence: 4/1 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11... # Use a for loop and if statements as needed. Store the sum in the # object 'result'. # Once your code works, increase iterations to 10000+ and see what you get. # Hints: # - use an object called "add"...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT