put it in a container and just reverse it
vector, list, array, map, queue, array (built-in), set, stack, etc
so something like that instead ?
while(i<5)
{
Sum[i1]= i + 2
i++;
i1++;
cout << sum[i] << endl;
}
for (i=5; i>=0; i--)
cout << sum[i1] << endl;
Last edited on