I have no idea how can i make a problem..that will run.. can any body help me how to make my project nice..my teacher told me that it was so ugly..she wants me to do like.. when your typing a # it should appear a clue on the correct target..can someone improve this one?? and make it work correctly?? please help me.. i need it tomorrow.. :(

#define TARGET 23
#define LOW 0
#define HIGH 30
#define TRUE 1
#define FALSE 0


      int process( int guess, int target );
      int main( void )
{
  
      int a_guess, correct;
      correct = FALSE;
      printf( "Welcome to Gudger's WOrld!! ^_~)\n" );
      printf( "I will choose a number between %d and %d.\n", LOW, HIGH );
      printf( "Try to guess the best number for me,\n" );
      printf( "I will tell you if your guess is too high or too low.\n" );
      printf( "Guessing my best number would be a great challenge for you.\n" );
      while ( correct == FALSE ) {
      printf( "Are you ready??.\n\n " );
      printf( "Try to guess it now!! " );
      printf( "Break a Leg! ^_^\n\n\n\n " );
      printf( "Your Guess is??-->\t" );
      scanf( "%d", &a_guess );
      correct = process( a_guess, TARGET );
}
      return 0;
  
}
  
       
  
      int process( int guess, int target )
  
      {
  
      if ( guess < target )
  
      printf( "Too low!\n" );
  
      else if ( guess > target )
  
      printf( "Too high!\n" );

      else if ( guess > 30 )

      printf( "Illegal guess. Your guess must be between 1 and 100.\n" );

      else if ( guess < 1 )

      printf( "Illegal guess. Your guess must be between 1 and 100.\n" );

      else (guess == TARGET);
 
      return TRUE;
      
      printf( "Gotcha!! Congratulation!!! You are CERTIFIED GUDGER ADDICT!! \n" );
      
  
      
      }

my teacher says that i won't use too high & too low..
instead i will give a clue according to the number of your guess..
example..the target is 23..then i guess 10 then it should appear like 5+8+10
then the one who guessed it, will get the correct answer..something like that..but i dunno how to do it..Please do help me.. :(

Line 29. Why do you have a closing brace there?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.