//a program to demonstrate functions and logic #include #include double func(double x); /*prototype*/ main() { double z; z=func(1.2347); if(z<1) { printf("z is less than 1\n"); } else if(z>1){ printf("z is greater than 1\n"); } else{ printf("z=1\n"); } } double func(double x) /*definition*/ { double y; y=pow(sin(x),2) + pow(cos(x),2); return y; }