Ang Blog ni Paurong!

Dahil hindi plantsado ang buhay ng tao.

A function-oriented C program that will display the reverse of the input sequence numbers.

Posted by Paurong sa Martes, Oktubre 23, 2007

/* A function-oriented C program that will display
the reverse of the input sequence numbers. */

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

int output();

void main()
{
int n;
clrscr();
printf(“Input a number: “);
scanf(“%d”, &n);
output(n);
}

int output(x)
{
int r;
for ( ; x!=0 ; )
{
r = x % 10;
printf(“%d”, r);
x = x / 10;
}
getch();
return 0;
}

2 Tugon to “A function-oriented C program that will display the reverse of the input sequence numbers.”

  1. rhiana13 said

    try using java its a less complicated code

  2. nimrod said

    i agree…

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: