cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
need help!
need help!
Nov 9, 2012 at 10:49am UTC
tehmoor
(1)
hi evry1. i need to compile a prog which generates even numbers from 1 tp 20 without using conditional statements(if, else if)...just using for loop.
thnx
Nov 9, 2012 at 11:14am UTC
vlad from moscow
(6539)
for ( int i = 2; i <= 20; i += 2 ) std::cout << i << ' ';
Last edited on
Nov 9, 2012 at 11:20am UTC
Topic archived. No new replies allowed.