//a program to demonstrate functions and for loop #include #include void func(double x); /*prototype*/ main() { double n; for (n=0; n<10; n=n+0.01){ func(n); } } /*given a double precision real number the function returns statment lettting the user know if it is 1*/ void func(double x){ double z; z=pow(sin(x),2)+pow(cos(x),2); 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"); } }