title: error: expected expression before ‘void’
body: <p>Im using Cloud 9 environment and this code is bugging me, we got it for an assignment it shows the following compilation errors, i am stuck with these</p>
  
  <blockquote>
    <p>lab.c: In function ‘main’: lab.c:14:12: error: expected expression
    before ‘void’
        getType(void);</p>
    
    <p>^ lab.c:14:12: error: too many arguments to function ‘getType’
    lab.c:4:7: note: declared here  float getType(void);</p>
    
    <p>^ lab.c: In function ‘getType’: lab.c:20:5: warning: format ‘%f’
    expects argument of type ‘double’, but argument 2 has type ‘float
    (*)(int,  int)’ [-Wformat=]
         printf("Total airfare is: %.2f",ticketPrice);</p>
  </blockquote>
  
  <pre><code>    //calculation cost aircost by given type
  
  #include &lt;stdio.h&gt;
  float getType(void);
  float ticketPrice(int type,int noOfSeats);
  int main(void)
  {
     int type,noOfSeats;
  
     printf("Enter the type(1 or2): ");
     scanf("%d", &amp;type);
     printf("Enter the no of seats: ");
     scanf("%d", &amp;noOfSeats);
     getType(void);
     ticketPrice(type,noOfSeats);
     return 0;
  }
  float getType(void)
  {
      printf("Total airfare is: %.2f",ticketPrice);
  
  }
  float ticketPrice(int type,int noOfSeats)
  {
     float Tprice;
  
     if (type=1){
        printf("Economy Class\n");
        type=90000;
        printf("90,000\n");
        Tprice=90000*noOfSeats;
        printf("Total airfare is:%.2f ",Tprice);
        return 0;
     }
     else if(type=2){
        printf("Business class\n");
        type=120000;
        printf("120,000\n");
        Tprice=120000*noOfSeats;
        printf("Total airfare is :%.2f ",Tprice);
     }
     else if(type!=1||2){
         printf("invalid type");
        return 1;
     }
  }
  </code></pre>