Computer Science, asked by aqsakhan6765, 5 months ago

Write a program which shows even number only

Answers

Answered by Yengalthilak12
14

To understand this example, you should have the knowledge of the following C programming topics:

  • C Programming Operators

  • C if...else Statement
Answered by Anonymous
3

Write a C program that prints all even numbers between 1 and 50 (inclusive).

Pictorial Presentation:

C Code:

#include <stdio.h> int main() { int i; printf("Even numbers between 1 to 50 (inclusive):\n"); for (i = 1; i <= 50; i++) { if(i%2 == 0) { printf("%d ", i); } } return 0; }

Similar questions