Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,038 questions

40,803 answers

573 users

How to use pow as exponentiation function in C

1 Answer

0 votes
#include <stdio.h>
#include <math.h>

int main() {
    double x = 5.0;

    printf("x^2: %.2f\n", pow(x, 2));

    return 0;
}




/*
run:

x^2: 25.00

*/

 





answered May 7, 2021 by avibootz

Related questions

1 answer 46 views
2 answers 88 views
1 answer 28 views
1 answer 112 views
...