Write a while loop that is functionally equivalent outputs t

Write a while loop that is functionally equivalent (outputs the same thing) as the following for loop: for x in range (56, 120): if (x

Solution

1.Answer

n=56,sum=0,i=0;

while(n<120)

{

sum=n+sum;

}

i++;

printf(\"sum of integers from 56 to 120 is\",summation);

4.answer

A black box is any device whose workings are not implicit by or available to its user. the first black box was a gun sight carried on World War II Flying fortress, with hidden components that corrected for environmental variables, such as wind rapidity. The crew almost certainly didn\'t know how the device worked, but they knew it might be crucial to their endurance. Nowadays, there are two types of black box accepted on aircraft, which may be combined into a single device: a flight data recorder (FDR), which logs in sequence such as velocity and elevation, and a cockpit voice recorder (CVR), which logs all voice statement in the cockpit. These black boxes also carry beacons to help find the aircraft in a rescue situation.

 Write a while loop that is functionally equivalent (outputs the same thing) as the following for loop: for x in range (56, 120): if (x Solution1.Answer n=56,su

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site