help in c language

, ,

howbcan i print A^2 means exp in c language

you can use the pow function in the header file math.h!!!

pow fxn can be used in this way…:slight_smile:

also if you just want to print a^2…then print a*a…:slight_smile:

but a way more faster method is exponential by squaring…for higher powers…:slight_smile:

hope this helps…:slight_smile:

There are two methods.

  1. print pow(a,2). pow function can be found in math.h header file

    printf("%d",pow(a,2));

  2. print a*a.

    printf("%d",a*a);

I Dont want to print the value i want to print the A power 2 whole itself on output screen not the value plz help me.

you mean to say like this…http://ideone.com/E4u12s …???

I Dont want to print the value i want to print the A power 2 whole itself on output screen not the value plz help me.