01: // predefined function fabs()
02: #include<stdio.h>
03: #include<stdlib.h>
04: #include<math.h>
05:
06: int main(int argc, char **argv){
07:
08: double a, b;
09: printf("Please enter two numbers: ");
10: scanf("%lg%lg", &a, &b);
11:
12: printf("The absolute difference between %g and %g is %g\n", a, b, fabs(a-b)); // despite the name is double fabs(double x);
13: return 0;
14: }
15:
16:
Se avete commenti o osservaƶioni su questa pagina
mandate un messaggio di posta elettronica a bertoƶƶi@ce.unipr.it
mandate un messaggio di posta elettronica a bertoƶƶi@ce.unipr.it