This isn't all the code of a program nor is it finished so its v.likely to not be perfect yet. My problem is with this loop, when the program comes to it, it prints to screen two lots of "choose from the....." and then waits for the input that will get put in &choose.
Any ideas why this would be. Thanks
Code:
while (choose != 'q') {
printf("Choose from the following set of options:\n");
printf("Get the (m)edian, (a)verage, or (q)uit?: ");
scanf("%c",&choose);
//PROBLEM WITH WHILE LOOP ABOVE
int i;
switch (choose) {
case 'm':
bubble_srt(ptr, num);
for (i=0;i<num;i++)
printf("ptr[i] = %d",i,ptr[i]);
//printf("The median for your set of numbers will be:\n%f",median);
break;
case 'a':
for (i=0;i<num;i++) {
sum += ptr[i];};
mean = (sum/num);
printf("The average for your data set will be:\n%f",mean);
break;
default:
break;
}
}