I'm new here so please don't be rude. Okay, my problem is I don't know the exact code on how you print in reverse in array.

Here's the problem:
Write a program to input a set of five numbers and print them out n the reverse order of input. Put both the input and printing in loops.

I'm new here so please don't be rude.

I fail to see the logic here. Why would be we rude? Why would your being new change that? Now for the kicker: if you know the answer to both of those questions, you're not so new as to avoid the rudeness that new people would be spared because you understand the action that prompts rudeness and still did it anyway. Otherwise you wouldn't feel the need to claim being new for the purpose of avoiding rude responses.

my problem is I don't know the exact code on how you print in reverse in array.

Given an array a of int with size n :

int i;

for (i = n - 1; i >= 0; i--)
    printf("%d\n", a[i]);

The process is identical to printing the array normally, except with an index that descends from n-1 to 0.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.