Write a program which shows even number only
Answers
Answered by
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
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
Hindi,
2 months ago
Biology,
2 months ago
Physics,
5 months ago
Sociology,
9 months ago
Business Studies,
9 months ago