title: Problems with graphing program
body: <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  #define CHANGE 0.5
  #define YMAX (yourterminallength/(2*(1/CHANGE)))
  #define YMIN (-yourterminallength/(2*(1/CHANGE)))
  #define XMAX (yourterminalwidth/(2*(1/CHANGE)))
  #define XMIN (-yourterminalwidth/(2*(1/CHANGE)))
  
  int main()
  {
  float m,b,y,x,c;
  
  cout &lt;&lt; "Intervals:" &lt;&lt;  CHANGE &lt;&lt; "    \tYMAX: " &lt;&lt; YMAX &lt;&lt; "\tYMIN: " &lt;&lt; YMIN &lt;&lt;      "\tXMAX: " &lt;&lt; XMAX &lt;&lt; "\tXMIN: " &lt;&lt; XMIN;
  cout &lt;&lt; "\nEnter any key to continue...";
  cout &lt;&lt; "nEnter a linear equation in slope-intercept form: y = Mx + B";
  cout &lt;&lt; "\nM=";
  cin &gt;&gt; m;
  cout &lt;&lt; "B=";
  cin &gt;&gt; b;
  
  c=YMAX;
  while(c&gt;YMIN)
  {
      x=XMIN;
      while(x&lt;XMAX)
      {
          if(c==0)
          {
              if(x==0)
                  cout &lt;&lt; char(197);
              else
                  cout &lt;&lt; char(196);
          }
          else if(x==0)
              cout &lt;&lt; char(179);
          else if((m*x+b)==c)
              cout &lt;&lt; char(254);
          else
              cout &lt;&lt; char(176);
          x+=CHANGE;
      }
      c-=CHANGE;
  }
  return 0;
  }   
  </code></pre>
  
  <p>The program is meant to graph simple linear equations. It has worked fine on my Windows computer and I simply made a copy of it to run on my Ubuntu OS, but the outcome looks funny. I know I am not giving much information, but I have no idea what is wrong with this.</p>