display "x squared"

This is a discussion on display "x squared" within the C Programming forums, part of the General Programming Boards category; Hi All! Is there a way of displaying X squared as in x superscript 2 to the screen? Thanks...

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    224

    display "x squared"

    Hi All!

    Is there a way of displaying X squared as in x superscript 2 to the screen?

    Thanks

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    No, sorry, that's impossible.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,682
    This is what i tried. Dunno whether this is what you wanted

    Code:
    #include<stdio.h>
    
    int main()
    {
        printf("X%c", 253);
        
        getchar();
        return 0;
    }
    
    /* my output
    X&#178;
    */
    ssharish2005

  4. #4
    Registered User
    Join Date
    Nov 2006
    Posts
    224

    Talking

    exactly what I wanted. Thank you very much!!

  5. #5
    Registered User
    Join Date
    Jun 2005
    Posts
    6,295
    Keep in mind that solution is not universal. It depends on what character set is supported by your compiler and the system you are running on.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. display character size...(quite urgent..)
    By karthi in forum C Programming
    Replies: 10
    Last Post: 07-11-2007, 09:42 PM
  2. new problem with class
    By jrb47 in forum C++ Programming
    Replies: 0
    Last Post: 12-01-2006, 07:39 AM
  3. about scan 7-segment display via parallel port
    By mobdawg in forum C Programming
    Replies: 4
    Last Post: 09-11-2002, 06:11 AM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  5. Printf to display chars
    By CodeMonkey in forum C++ Programming
    Replies: 4
    Last Post: 03-14-2002, 04:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21