cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
conditional statement
conditional statement
Jun 6, 2013 at 11:57pm UTC
Blank
(78)
how do i turn this into if/else statement
cout << (((num % 2) == 0) ?
"Even\n"
:
"Odd\n"
);
Jun 6, 2013 at 11:58pm UTC
vlad from moscow
(6539)
if ( num % 2 == 0 ) cout << "Even\n";
else cout << "Odd\n";
Last edited on
Jun 6, 2013 at 11:59pm UTC
Topic archived. No new replies allowed.