Show all numbers betwen 2 variables
How to show all numbers betwen 2 variables example from variable n1 = 1 to variable n2 = 10
Thanks
1 2 3 4 5 6
|
int n1 = 1, n2 = 10;
for (n1; n1 < n2-1; n1++)
{
cout << n1+1 << " ";
}
|
Oh :D
Thank you so mutch :)
Topic archived. No new replies allowed.