One of various computer programming languages, C is the most basic and widely used language, likely because it gives maximum efficiency and control to programmers. The C language can be used for mathematical operations, ranging from additions and subtractions to square roots and cube roots, along with other polynomial powers that can be created through C programming. To find the square root of a number, you can customize the C script to code the logic by using the sqrt function.
To find a square root in C program, here is sample program:
#include <math.h> #include <stdio.h> int main(void) { double x = 4.0, result; result = sqrt(x); printf("The square root of %lf is %lfn", x, result); return 0; }
Need more help with C programming? Check out our Forum!
Languages
- C program to find square root and cube root of a number
- C programming sqrt
- C square root
- Android scientific calculator: how to enable it > Guide
- Matrix Calculator Pro > Download
- C++ program computing sum of squares of two > Forum - Programming
- Write a program to print a pattern like: 1 11 111 1111 11111 111111 [solved] > Forum - Programming
- Kingo root > Download
- What are Accessors and Mutators C++
- My Documents + Environment Variables in VBA/VB6
- Programming: quotation marks, apostrophes and strings
- C++ open url: in default browser
- Keep application window on top of other apps with VB6
- Remove the underline from links in HTML, CSS
- How to draw a human face using code?
- VB6 RGB color: chart, codes
- How to write and read CSV files in Python
- The best free online programming courses