>I think it is a problem with where I have the loop but I am not sure.
The problem is how you are solving the problem. If you want an array of integers, then simply declare the array as such and input integers instead of strings. It would be so much simpler if you did this. But you obviously haven't been listening to my advice since your first post, so I'll offer one last suggestion that is roughly what you wanted and then leave you to your own erroneous solutions.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#define true 1
#define false 0
int max_function ( void )
{
char std_array3[20];
int b = 0, max = 0;
int quit = false;
do
{
printf ( "Enter a number (type end to quit): " );
scanf ( "%s", std_array3 );
if ( strcmp ( std_array3, "stop" ) == 0 )
quit = true;
else {
b = atoi ( std_array3 );
if ( b > max ) max = b;
}
}
while ( !quit );
printf ( "The maximum value of integers is %i\n", max );
return 0;
}
int main ( void )
{
max_function();
return 0;
}
-Prelude