This is my practice program for finding the resultant force in statics. When I run the program it will run through the loop once fine, but the second time it skips the scanf command and prints the printf commands in an infinite loop. I have been trying to figure out why this is and would really appreciate your help. Thanks!

[code]
#include <stdio.h>
#include <math.h>
#include <stdlib.h>

int main(){
float xr = 0, fr = 0, num = 0;
float force = 0, x = 0, centroid = 0;
num = 0;

while (xr >= 0){
printf("enter Force and centriod separated by a comma,\n");
printf("enter 0 for centroid to finish.\n");
scanf("%f %f", &fr, &xr);

force = force + fr;
x = x + xr;
xr = 0;
centroid = (force * x) / force;

}

printf("\tResultant force is %f\n", &force);
printf("\tCentroid is %f\n", &centroid);

return 0;
}
[\code]