comp.lang.ada
 help / color / mirror / Atom feed
* Problem from a Newbie
@ 2004-01-13  8:44 Cecilia Chew
  2004-01-13 12:37 ` David C. Hoos
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Cecilia Chew @ 2004-01-13  8:44 UTC (permalink / raw)


Hello All,
I'm a newbie in Ada. There are a lot of question mark in my mind. I'm 
now doing a simple program and the desired output is a signal wave as below.

*      **      **      *
  *    *  *    *  *    *
   *  *    *  *    *  *
    **      **      **
And the coding that i have done is as follow.

with Ada.Text_Io, Ada.Float_Text_IO;
use Ada.Text_Io, Ada.Float_Text_IO;

procedure Graph1 is
    Y : Integer;
    Max_Point : Float;
    Min_Point : Float;
    Pi : Constant := 3.142;
begin

    Max_Point := 1.0;
    for X in 0 .. 360 loop
       for r in 0.0 .. Max_Point loop
          Y := sin (X * 2 * Pi/360);
          Put ("*");
       end loop;
    end loop;
end Graph1;

Could someone tell me what are the mistakes in the coding? Error message 
from the compiler is the 'sin' is undefined. what should i do with this?


-- 
Cecilia Chew
c e c i l i a <AT> g r e e n l i m e . c o m



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-01-15  8:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-13  8:44 Problem from a Newbie Cecilia Chew
2004-01-13 12:37 ` David C. Hoos
2004-01-13 17:42 ` Jeffrey Carter
2004-01-14  5:49 ` Steve
2004-01-14 21:08   ` Simon Wright
     [not found] ` <kc8fd1-ul5.ln1@beastie.ix.netcom.com>
2004-01-14 16:42   ` Jean-Pierre Rosen
2004-01-15  8:56     ` Dmitry A. Kazakov
2004-01-14 17:41   ` Jeffrey Carter
2004-01-15  1:03     ` Jeffrey Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox