Write code in c using a for loop that produces the following

Write code in c++ using a for loop that produces the following output:

12 14 16 18 20

Solution

Answer:

The for loop that produces the given output is as below :

for(i=12;i<=20;i+=2)
{
cout<<i<<\" \";
}

Output :

12 14 16 18 20

Write code in c++ using a for loop that produces the following output: 12 14 16 18 20SolutionAnswer: The for loop that produces the given output is as below : f

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site