Beginner programmer, and I received an error :  printf("The rate of train 1 and train 2 respectively are what values?\n");
 scanf("%d%d", &rate_1_mph, &rate_2_mph);

 printf("What was the total distance the trains were apart initially?\n");
 scanf("%d", &distance_total_mile);

 printf("The time it takes both trains to arrive side-by-side is %.31f minutes.\n", time_minute);

 printf("The distance train 1 had to travel was %.21f miles.\n", distance_1_mile);
 printf("The distance train 2 had to travel was %.21f miles.\n", distance_2_mile);

 return 0;
}

The error I received was: "warning: format '%f' expects argument of type 'double', but argument 2 has type 'int *".

I've tried looking this up on this site, and I saw the same question solved two different ways but neither seemed to work. I also didn't post the entire code because the other example I saw didn't either, and their question was answered. 
