sqrt.m.c 390 B

12345678910111213141516
  1. /* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
  2. /* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
  3. #include <stdio.h>
  4. #include <math.h>
  5. int main(int argc, char ** argv) {
  6. float x;
  7. printf("enter a float: ");
  8. fflush(stdin);
  9. scanf("%f", &x);
  10. printf("sqrt(x) = %f\n", sqrt(x));
  11. return 0;
  12. }