0

Question can't solve it

system asks for two numbers. i need to print the numbers between them from the small to the big and reverse (big to small) for ex: 123321

27th Aug 2016, 8:20 PM
Maor
3 Answers
+ 3
you can create 2 loops. a = 1 b = 3 for(int i = a; i<=b; i++) Console.Write(i); for(int i = b; i<=a; i--) Console.Write(i);
27th Aug 2016, 11:56 PM
Or Batson
0
second loop condition is wrong. it should be like I>=a;
4th Sep 2016, 6:48 PM
Vijay Makwana
Vijay Makwana - avatar
0
hi what is mean x++ & ++x?
12th Sep 2016, 9:08 PM
Doloop