+ Reply to Thread
Results 1 to 3 of 3

Thread: Column Labels in Microsoft Excel

  1. #1
    Krazy Guest

    Column Labels in Microsoft Excel

    Excel labels its rows with letters. For example row 0 is labeled 'A', row 1 is labeled 'B', row 26 is labeled 'AA', and so on.

    Design, and implement in C, an algorithm that will map any row number, such as 2842, into into its proper row designation. For instance row 2842, maps to the designation 'DEI'

  2. #2
    puspendra Guest
    input=2842

    printLabel(int input)
    {
    if( input < 26)
    printf("%d",input +'A');
    else
    {
    printLabel(input/26);
    printf("%d",input%26+'A')

    }
    }

  3. #3
    Pradeep Panwar is offline Junior Member
    Join Date
    Nov 2010
    Posts
    4
    There is a small correction in the above program
    void printLabel(int input)
    {
    if( input < 26)
    printf("%c",input +'A');
    else
    {
    printLabel(input/26 -1);
    printf("%c",input%26+'A');
    }
    }

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Microsoft written and interview Questions
    By TopGun in forum Microsoft
    Replies: 0
    Last Post: 29th May 2008, 15:41

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts