Question #300229

Write a program in C that display even numbers between 50 and 250 using do while loop. 


Expert's answer

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>


int main()
{
    int start = 50 , end = 250 , i = start;
    do
    {
        if (i % 2 == 0)
        {
            printf("%d\t", i);
        }
        i++;
    } while (i <= end);


    getc(stdin);
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS