//Bdip exercise //YOUR NAME HERE #include #include const double pi=3.141592653589793; int main() { double r=0.0; // MAKE THE REST OF YOUR DECLARATIONS HERE printf("\nThis program will provide the r(hat) and theta(hat) components of the B field for a pure dipole.\n"); // THE FOLLOWING CODE HANDLES THE DIVIDE BY ZERO POSSIBILITY while (r == 0.0) { printf("\nEnter the distance, r > "); scanf("%lf",&r); if (r == 0.0) { printf("\nr can not be zero, try again...\n\n"); } } // PUT THE REST OF YOUR CODE HERE return(0); }