i'm trying to get help because i'm doing a good job and i'm stuck so please help me please
Code:
#include<stdio.h>
int
main(void){
int n,count,k;
double total_money,temp,min_exch,min,rate,max;
count=1;
k=2;
printf("please enter the number of student\n");
scanf("%d",&n);
printf("please enter the total money spent in the trip\n");
scanf("%lf",&total_money);
rate=total_money/n;
printf("%f",rate);
while(count<=n){
min=0;
printf("please enter the amount of money spent by each one\n");
scanf("%lf",&temp);
if((temp+min_exch)<rate){
{
max=0;
if(temp>max)
max=temp;
}
min_exch=0.000;
while((max+min_exch)<rate){
min_exch=min_exch+0.001;
min=min_exch*k;
printf("the minimum exchage is %.2f\n",min);
}
count++;
}
else
count++;
}
return(0);
}