Use two variables inside the parantheses of a for() loop. Write a program with minimal lines that outputs two columns of integers. The first column prints integers in ascending order, the second column prints integers in descending order
I currently have the following:
---------------------------------------------------------------------------
//printout one column from 1to 5, and the next columm
//from 5 to 1
In the line for ( upNum <= 5, dwNum >= 1; upNum > 5, dwNum < 1; upNum++, dwNum-- ), you can see that you have written upNum <= 5, dwNum >= 1; upNum > 5, dwNum < 1. upNum can't be <= 5 and > 5 at the same time, and dwNum can't be >= 1 and <1 at the same time.
In a for loop, the first is where you declare your variables - for(upNum = 1, dwNum = 5), the second is where you set your condition - < 5, > 5, etc and the third is where you do what you need to do (++, --).
Also, please use [c0de][/c0de] tags in the future, as opposed to using bold.