All pastes #164943 Raw Edit

eclipse75

public c v1 · immutable
·published 2006-09-09 07:25 UTC
rendered paste body
#include <stdio.h>#include <math.h>char input[100];float answer;int main(){        printf("Enter value to find square root:\n> ");        fgets(input,sizeof(input),stdin);        sscanf(input,"%f",&answer);                float sqrtf(float answer);        printf("Calculated answer: %f\n", answer);                     return 0;}bash-3.1$ gcc -g -Wall -o 6-1 6-1.cbash-3.1$ 6-1                      Enter value to find square root:> 11Calculated answer: 11.000000bash-3.1$