605 Words3 Pages

Short Answers:
5. What two things must you normally specify in a variable declaration? * the variable type and identifier.
6. What value is stored in uninitialized variables? * Some languages assign a default value as 0 to uninitialized variable. In many languages, however, uninitialized variables hold unpredictable values.
Algorithm Workbench:
3. Write assignment statements that perform the following operations with the variables a, b, and c. a) Adds 2 to a and stores the result in b * b=a+2 b) Multiplier b times 4 and stores the result in a * a=b*4 c) Divides a by 3.14 and stores the result in b * b=a/3.14 d) Subtract 8 from b and stores the result in a * a=b-8
4. Assume the variables result, w, x, y, and z are all integers, and that w=5, x=4, y=8, and z=2. What value will be stored in result in each of the following statements? a) Set result = x + y * 12= x + y
b) Set result = z + 2 * 4=z * 2
c) Set result = y / x * 2=y / x
d) Set result =y – z * b=y – z
5. Write a pseudocode statement that declares the variable cost so it can hold real numbers. * Dim cost1 As Double = 0
6. Write a pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0. * Dim cost1 As Integer = 0
7. Write a pseudocode statement that assigns the value27 to the variable count. * Dim count As Integer = 2
8. Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total. * Total = 10 + 14
9. Write a pseudocode statement that subtracts the variable downPayment from the variable total and assigns the result to the variable due. * Due = total – downPayment
10. Write a pseudocode statement that multiplies the variable subtotal by 0.15 and assigns the result to the variable totalfee. *

Related

## Nt1210 Chapter 1 Review Questions

1419 Words | 6 PagesChapter 1 review questions 1. Which of the following is true about 1 bit? a. Can represent decimal values 0 through 9 b. Can be used to represent one character in the lowercase English alphabet c. Represents one binary digit d. Represents four binary digits 2.

## Math 471 Week 1 Case Study

1035 Words | 5 PagesAdding the two cases above, we arrive at the answer: un = un−1 + un−2 . (c): Use either (a) or (b) to determine the number of bit strings of length 7 that do not contain two consecutive zeros. SOLUTION: We note directly that u1 = 2 and u2 = 3. Then u3 = 2 + 3 = 5, u4 = 3 + 5 = 8, u5 = 5 + 8 = 13, u6 = 8 + 13 = 21, and u7 = 13 + 21 = 34. Problem 3.

## Unit 4 Programming Exercises

552 Words | 3 PagesWhen the module is called, it should display the product of its argument multiplied times 10. Module main() timesTen() Module timesTen Dim Result As Integer Set result = value * 10

## Nt1210 Lab 8

789 Words | 4 PagesYes because the 190 falls under class b. Exercise 8.1.5 What is the slash notation equivalent of subnet mask 255.255.255.0? 11111111.11111111.11111111.00000000 What is the

## MAT 222: Intermediate Algebra

833 Words | 4 PagesTherefore, subtract the function “h” from “f”, and then input 4 for the x values. Since there are rules of composition, each function may be calculated separately and then subtracted. Simplifying the h function = h4=7-(4)3 Take the h function and replace the variable x with 4 within the expression. h4=1 3 (7-4) First, subtract -1 by 4 inside the parentheses. Then, subtract 4 from 7. h4=3 3 When subtracting 4 from 7 the answer is 3. h4=3 3 Cancel out the common factors of 3 from the expression.

## Exercise 1.1 Review

426 Words | 2 PagesBecause when you plug the binary numbers into the 8 bit conversion table, the two zeros before the 10 equal nothing. So 10 and 0010 have the same decimal number. 128 64 32 16 8 4 2 1 128 64 32 16 8 4 2 1 1 0 = 2 0 0 1 0 = 2 3. Based on the breakdown of the binary and decimal systems in this lab, describe the available digit values and the first four digits of a base 5 numbering system. You can use the binary system as a reference, where the available digit values are 0 and 1 and the first four digits are 1, 2, 4, and 8.

## Nt2640.U3.As1 Essay

269 Words | 2 Pages7. Given 9 bits of mask for the host portion, how many host addresses are available? 8. Given 13 bits of mask for the host portion, how many host addresses are available? 9.

## Summary: M6 WPS Activity

479 Words | 2 PagesGive a complete explanation for the "Negative ..._______The negative exponent rule states that when a variable or number is raised to a negative exponent, the expression may be rewritten as one divided the variable or number raised to that positive exponent. A negative exponent indicates “reciprocal”. When a factor is moved from the denominator to the numerator or from the numerator to the denominator, the sign of the exponent changes.9. Give a complete explanation for the "Fraction raised to... ______In the fraction raised to a negative exponent rule, with fractions in the form a over b, a is not equal to zero and b is not equal to zero. A over B with a negative

## Gac04 Quiz 4

3198 Words | 13 Pages5) Information about Clearwater Company's direct materials cost follows: Standard price per materials ounce $ 100 Actual quantity used 8,700 grams Standard quantity allowed for production 9,100 grams Price variance $ 76,125 F ________________________________________ Required: What was the actual purchase price per gram? (Round your answer to 2 decimal places. Omit the "$" sign in your response.) Actual purchase price $ 91.25 Total grade: 0.0×1/1 = 0% Feedback: Actual Costs = AP × 8,700 Actual Inputs at Standard Price = $100 × 8,700 =$870,000 Price Variance = $76,125 F 8,700 × AP = $870,000 – $76,125 AP = $91.25 ________________________________________ Question 3: Score

## Nt1210 Lab 1 Essay

560 Words | 3 Pagesprintf("i=%d\n",i); i= i* j * 2; //Integer multiplication. printf("i=%d\n",i); j= i / 10; //Integer division printf("j=%d\n",j); return 0; } Exercise 1.4 Write a program that demonstrates the use of the +,-,* and / operators for floating point numbers. Type the following program. Compile, link and run it. #include <stdio.h> int main(

### Nt1210 Chapter 1 Review Questions

1419 Words | 6 Pages### Math 471 Week 1 Case Study

1035 Words | 5 Pages### Unit 4 Programming Exercises

552 Words | 3 Pages### Nt1210 Lab 8

789 Words | 4 Pages### MAT 222: Intermediate Algebra

833 Words | 4 Pages### Exercise 1.1 Review

426 Words | 2 Pages### Nt2640.U3.As1 Essay

269 Words | 2 Pages### Summary: M6 WPS Activity

479 Words | 2 Pages### Gac04 Quiz 4

3198 Words | 13 Pages### Nt1210 Lab 1 Essay

560 Words | 3 Pages