Close
Close

How do I use a condition ( nested if/else) dependent on a character input? ( Last practice question of decide if/else )

   ryan_coop10

include <stdio.h>

main()

{

statement 

statement 

statement

char c ;

printf (“Did you submit a medical certificate?” ) ;

scanf (“ %c”,&c) ;  //used a space before %c

if(med='N')
  {
   if(per>=75)
  
    printf("Yes, you are allowed ");
  }
  else if (med=='Y');
  {
      if(per>=65)
  
    printf("Yes, you are allowed ");
  }
  
  return 0;
}

The conditions arent considered in the output. 

What am i doing wrong here?

 

 


Answers

Ask Yours
Post Yours
Write your answer