[RESOLVED] Shift logic test

I needed bit help in coding for the following scenario


We have to take an integer value as an input(like 123,356 etc) if the left most no is lesser than the no to its right it has to display it as an absolute no. I know some where i have to use array logic but i m not getting how. Any help will be deeply appreciated.


Harsha D

Sry for putting out such a silly post. I was thinking in complex way but solution was very simple which uses the simple logic of reverse of a no. Any way apologies

pls check this.....

 string value = "123456";

        char first = value[0];
        char last = value[value.Length - 1];

        if (first <= last)

thoughts on "[RESOLVED] Shift logic test"

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>