//a program to demonstrate functions and while loop #include #include void func(double x); /*prototype*/ main() { double n; n=0.0; while(n<10){ printf("n = %0.3f\n",n); func(n); n=n+0.01; } } /*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); printf("z = %0.20f\n",z); if(z<1) { printf(" z is less than 1\n\n"); } else if(z>1){ printf(" z is greater than 1\n\n"); } else{ printf(" z is equal to 1\n\n"); } }