Hi everybody

Anyone knows how to verify the ordinance of numbers but without using vectors!..

example:
n=3456;
the order is ascendent

or

n=9874321
the order is descendent

it seems we need to create a fuction but I´ve no idea how!

plese help...:eek:

Recommended Answers

All 2 Replies

I'm not sure how to do it in C#, but in C or C++ I would format the integer as a string then test each character of the string.

What will you do when the digits are in random order? such as:
n=129438623;

well what I need to do is test if the numbers are incresing or decreasing
just that!

it seems to be easy but i don´t know how to do it not using vectors

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.