/* File: proto2.c Demonstrate the need for prototypes This is the corrected version. */ #include #include "genlib.h" #include "simpio.h" /* Include the prototype in this version */ double add3(double) ; main() { double x ; int n, m ; x = add3(5.0) ; printf("x = %f\n", x) ; n = add3(10.0) ; printf("n = %d\n", n) ; m = (int) add3(17.0) ; printf("m = %d\n", m) ; } double add3(double y) { double z ; z = y + 3.0 ; return(z) ; }