title: My C program does not run
body: <p>I am not a C enthusiast and I am writing this, grudgingly, as a part of my assignment. The program is to input two polynomials and to add them and display them. I wrote modules to input and display however the program does not run.  </p>
  
  <p>In <code>Dev-C++</code> it says I have multiple definitions of main.  </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  
  
  // This is my implementation to add and multiply
  // two polynomials using linked list
  // So far, it just inputs and displays the polynomial
  struct term {
      int exp;
      int coef;
      struct term *next;
  };
  
  struct term* addTerm(struct term *polynomial,int exp,int coef){ // adds a term to polynomial
      if(polynomial == NULL ){
          polynomial = (struct term *)malloc(sizeof(struct term));
          polynomial-&gt;exp = exp;
          polynomial-&gt;coef = coef;
      }else{
          struct term *newTerm = (struct term *)malloc(sizeof(struct term));
          newTerm-&gt;exp = exp;
          newTerm-&gt;coef = coef;
          polynomial-&gt;next = newTerm;
      }
      return polynomial;
  }
  
  void display(struct term *polynomial){ // displays the polynomial
      struct term *p = polynomial;
      while(p-&gt;next != NULL){
          printf("+ %dx%d",p-&gt;coef,p-&gt;exp); p = p-&gt;next;
      }
  }
  
  void main(){ // run it
      int i = 5;
      int coef = 0;
      int exp = 0;
      struct term *polynomial = NULL;
      while(i++ &lt; 5){
          printf("Enter CoEfficient and Exponent for Term %d",i);
          scanf("%d %d",&amp;coef,&amp;exp);
          polynomial = addTerm(polynomial,exp,coef);
      }
      display(polynomial);
      getch();
  }  
  </code></pre>
  
  <p>How do I get it to run ?</p>