Ang Blog ni Paurong!

Dahil hindi plantsado ang buhay ng tao.

A C program that will display (reverse) the 5 input values stored using one-dimensional array.

Posted by Paurong sa Miyerkules, Oktubre 24, 2007

/* A C program that will display (reverse) the 5 input values stored using
one-dimensional array. */

#include <stdio.h>
#include <conio.h>

void main()
{
int input[5];
int ctr; clrscr();
printf(“Enter 5 numbers: “);
for(ctr=0; ctr<5; ctr++)
{
scanf(“%d”, &input[ctr]);
}
for(ctr=4; ctr>=0; ctr–)
{
printf(“%d”, input[ctr]);
}getch();
}

5 Tugon to “A C program that will display (reverse) the 5 input values stored using one-dimensional array.”

  1. zsasha said

    une promesse .. ? une fleur d’amour .. ? le sourire d’un enfant … ?
    je déteste des promesses…
    je déteste l’amour…
    mais j’ai toujours mon enfant comme le sourire…

  2. F1NCH said

    nice one.

  3. dave said

    in the future, you will learn to code this using stacks and pointers. it’s more efficient.

  4. nimrod said

    how about two dimensional array?

  5. nagets ko na ang ilan dyan. haha. nagsastart na kami mag code.

Mag-iwan ng Tugon

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Palitan )

Twitter picture

You are commenting using your Twitter account. Log Out / Palitan )

Facebook photo

You are commenting using your Facebook account. Log Out / Palitan )

Google+ photo

You are commenting using your Google+ account. Log Out / Palitan )

Connecting to %s

 
%d bloggers like this: