C Programming and Technical Programming

integer i = 0 
integer sum = 0 
while ( i <= 50 ) 

sum = sum + i 
-- MISSING STATEMENT 5 -- 

print sum 

Read Solution (Total 6)

C Other Question

pankaj makes a program to print the products of cubes of the first 10 whole numbers.
integer x=0
integer sum=0
Consider the following code:

for i= m to n increment 2
{ print "Hello!" }

Assuming m < n and exactly one of (m,n) is even, how many times will Hello be printed?
Option 1 : (n - m + 1)/2
Option 2 : 1 + (n - m)/2
Option 3 : 1 + (n - m)/2 if m is even, (n - m + 1)/2 if m is odd
Option 4 : (n - m + 1)/2 if m is even, 1 + (n - m)/2 if m is odd