in Education by
b. Write a java statement to accomplish each of the following tasks: i. Declare a variable, sum and a to be of type int. ii. Assign 1 to variable a. iii. Assign 0 to variable sum. iv. Add variable a to variable sum and assign the result to variable sum. v. Print “the sum is :” followed by the value of variable sum. Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Answer: iv- add variable a to variable sum and assign the result to variable sum

Related questions

0 votes
    (c) Which of the following specifies that the table has no border? (i) border = 2 (ii) border = 1 (iii ... none (iv) border= 0″ 00 Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    A random variable X has the following probability distribution:Determine (i) k (ii) `P(X6)` (iv) `P(0...
asked Nov 13, 2021 in Education by JackTerrance
0 votes
    What is true about functions : I) Functions are objects II) Can be assigned to a variable III) Can be anonymous IV) Return value type has ... , III 3. I, II, III, IV 4. I, II, IV...
asked Feb 25, 2021 in Technology by JackTerrance
0 votes
    What is true about functions : I) Functions are objects II) Can be assigned to a variable III) Can be anonymous IV) Return value type has ... , III C) I, II, III, IV D) I, II, IV...
asked Oct 9, 2020 in Technology by JackTerrance
0 votes
0 votes
    Compare and contrast the following technologies (i) SRAM and DRAM (ii) USB and Serial Port (iii)Joystick and ... and LED display Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    $ (a) Which of the following is used to change the color of hyperlink from blue to any other color? (i) Link ... (iv) none of these 00 Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
0 votes
    (d) Which of the following is used to turn off the word wrapping? (i) valign (ii) wrap (iii) align (iv) nowrap g 00 Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    (a) The grey area surrounding the white area is called: (i) Work Area (ii) Stage (iii) Area (iv) Work Stage . Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
0 votes
    Let a and B be the events such that P(A)= 1 3 ,P(B)= 1 4 and P(A∩B)= 1 5 . Find : (i) P(A/B) (ii) P(B/A ... P(A∪B) (iv) P( ˉ B / ˉ A ) Select the correct answer from above options...
asked Nov 13, 2021 in Education by JackTerrance
...