C Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start C Course
Register
even numbers (variation1)
+2
Author: Celvien Kurniawan
Dark
Public
Save
C
c
1
2
3
4
5
6
7
8
9
10
11
//based from Brian's advice
#include
<
stdio.h
>
int
main
(){
int
x
;
while
(
scanf
(
"%d "
,
&
x
)
!=
EOF
)
{
if
((
x
%
2
)==
0
)
printf
(
"%d "
,
x
);
}
}
Enter to Rename, Shift+Enter to Preview
OUTPUT