446,191 Members | 751 Online
Need help? Post your question and get tips & solutions from a community of 446,191 IT Pros & Developers. It's quick & easy.

# need a cooment for looping

 P: n/a i have a problem in displaying the even value. i try to do the exercise in asking the user of the value of x and the value of y. then, showing the value bettween x and y. in between the value x and y there suppose to be an even and odd number. for exampe if the value x = 1 and the value of y = 5. then it will write 12345. (i done this). but, i have the problem in showing the even value between x and y . i use for loops for showing the 12345 and then i confused for showing the even value. i know the formula would be value*2.. Sep 30 '06 #1
4 Replies

 P: n/a #include using namespace std; void foo(int low, int high) { for (int i=low; i<=high; ++i) if ((i%2)==0) cout<

 P: n/a thank you lw1a2 wrote: #include using namespace std; void foo(int low, int high) { for (int i=low; i<=high; ++i) if ((i%2)==0) cout<

 P: n/a thank's lw1a2 wrote: #include using namespace std; void foo(int low, int high) { for (int i=low; i<=high; ++i) if ((i%2)==0) cout<

 P: n/a "lw1a2" using namespace std; void foo(int low, int high) { for (int i=low; i<=high; ++i) if ((i%2)==0) cout<

### This discussion thread is closed

Replies have been disabled for this discussion.