little help with glcd code

hii every one ... im trying to draw a straight line according to agiven angle but its not working !!! im using nokia 511 glcd . does any one have such acode ?

im trying to draw a straight line according to agiven angle but its not working !

Where is the code? What does the result look like?

#include "PCD8544.h"
PCD8544 nokia = PCD8544(3,4,5,7,6); 
void setup(void)
{
  nokia.init(); 
  nokia.command(PCD8544_DISPLAYCONTROL | PCD8544_DISPLAYNORMAL);
  nokia.clear(); 
}

void loop(void)
{

  int pause=500;
  nokia.drawstring(0, 0, "angle:");
  for(int i=0; i<=84;i++){ 
    //Random number simulating an angle value
    int y=random(360);  
    char buf[12];       

    nokia.drawstring(55, 0, itoa(y,buf,10)); 

    y= map(y, 0, 360, 0, 40); 
    //Draw a line with slope according to angle
    nokia.drawline(i,48,i,(48-y),BLACK); 
    nokia.display();
    delay(pause);

    nokia.drawstring(55, 0, "    "); 
  
  }
  nokia.clear();
  

}

Where is the code? What does the result look like?

You get a 50%. That's not a passing grade.