double array[60];// Define floating point number array.
char yesno='y'; // Define character "yessno" for while loop
while(yesno == 'y')// start while loop for when "yesno" is equal to "y"
{
printf("Enter a number.\n"); //Ask user for number.
scanf("%f", array); //assing number to array
printf("Would you like to enter another number? (y/n) \n"); // ask user for a character if they want to input another number.
yesno = getchar(); // asign character to "yesno" if yes no is anything but "y" loop with break.
}
thanks for your help!

New Topic/Question
Reply



MultiQuote





|