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…
also if you just want to print a^2…then print a*a…
but a way more faster method is exponential by squaring…for higher powers…
hope this helps…
There are two methods.
-
print pow(a,2). pow function can be found in math.h header file
printf("%d",pow(a,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.
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.