Raise-to in C

Status
Not open for further replies.

QwertyManiac

Commander in Chief
If you're using extended ASCII, you can do it using (char)253.

Sample:
Code:
#include <stdio.h>
// ASCII
int main(void)
{
    (void)printf("3%c\n",[B]253[/B]);
    return 0;
}

This should print 3²

Or in Unicode:
Code:
#include <stdio.h>
// UTF-8
int main(void)
{
    (void)printf("3\u[B]00B2[/B]",a);
    return 0;
}
// Requires compilation by a C++ or C99 standard compiler.

It prints the same too.
 
OP
zegulas

zegulas

Traceur
T159, I agreed to what you said above! But don't post stuff like "huh" as you have done above. The post counts don't matter, if you have information to share then just do that.
 

Faun

Wahahaha~!
Staff member
T159, I agreed to what you said above! But don't post stuff like "huh" as you have done above. The post counts don't matter, if you have information to share then just do that.
the huh part was for phenom, now it seems he has deleted his post

sorry i dont care abt post counts, you will find my most of the posts in chit chat section and gamers section.

sorry if u felt bad abt that :(, ask anything abt algorithms and language to Qwertymaniac
 
Status
Not open for further replies.
Top Bottom