-3
if(strcmp(p[pas].origin,"West")&&strcmp(p[pas].destination,"East")==0)
      {
       cost[pas]=5.62+5.62;
      }

is this the right code for the two input strings? or is there something wrong since the program runs but i cannot get the return value

Manu343726
  • 13,969
  • 4
  • 40
  • 75
mr.trey
  • 9
  • 2
  • There is not enough information in this question for us to help you. Until you explain what you're asking -1. Please read http://stackoverflow.com/help/mcve – nonsensickle Apr 05 '14 at 14:05

1 Answers1

1

Didn't run but should be like this

if((strcmp(p[pas].origin,"West")==0) && (strcmp(p[pas].destination,"East")==0)
      {
       cost[pas]=5.62+5.62;
      }
user3450718
  • 58
  • 1
  • 5