Answer to Question #300229 in C++ for king

Question #300229

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


1
Expert's answer
2022-02-22T16:32:01-0500
#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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog