How to make my coding to print 2nd statement in if else?


(Octavius Balangkit) #1

I was trying to print the 2nd if else statement but it will only print first statement whenever I enter any specific range time in am or pm.

#include <stdio.h>
#include <string.h>

  int main(void)
  {
       char am,pm,time_rent_start,time_rent_end;

            printf("\nTime rent start\t:");
			scanf("%s",&time_rent_start);
			printf("Time rent end\t:");
			scanf("%s",&time_rent_end);  
       
      if (7.00 > am < 11.00 || 12.00 > pm < 7.00)
         {
          printf("The delivery charges are RM 3.00");
         }
         else if(7.01 > pm < 11.00 || 12.00 > am < 6.59)
         {
          printf("The delivery charges are RM 5.00");
         }
   
         system("pause");
         return 0;
      
}