Microsoft Small Basic

Program Listing:
Embed this in your website
GraphicsWindow.Width=500
GraphicsWindow.Height=500
GraphicsWindow.BackgroundColor="black"
chart()
'This Part Made By WhTurner33,Thanks WhTurner33.
sub chart
  NN=4
  sum=0
  For i=1 To NN
    num[i]=50
    sum=sum+num[i]
  EndFor
  p2=Math.Pi/50
  GraphicsWindow.FontSize=20
  For i=1 To NN
    pct[i]=Math.Round(1000*num[i]/sum)/10
  EndFor
  alf=0
  For i=1 To NN
    alfh=alf+p2*pct[i]/2
    alfa=alf+p2*pct[i]
    If i=1 Then
      GraphicsWindow.PenColor="red"
    EndIf
    If i=2 Then
      GraphicsWindow.PenColor="yellow"
    EndIf
    If i=3 Then
      GraphicsWindow.PenColor="blue"
    EndIf
    If i=4 Then
      GraphicsWindow.PenColor="green"
    EndIf
    GraphicsWindow.BrushColor="red"
    For j=alf To alfa Step 0.01
      sline=Math.Sin(j)
      cline=Math.cos(j)
      GraphicsWindow.DrawLine(225,225,225+125*sline,225+125*cline)
    EndFor
    ss=Math.Sin(alf)
    cc=Math.Cos(alf)
    s2=Math.Sin(alfh)
    c2=Math.Cos(alfh)
    GraphicsWindow.PenColor="black"
    GraphicsWindow.DrawLine(225,225,225+125*ss,225+125*cc)

    alf=alfa
  EndFor
  GraphicsWindow.DrawLine(225,225,225,350)
  GraphicsWindow.DrawEllipse(100,100,250,250)
EndSub
Copyright (c) Microsoft Corporation. All rights reserved.