plotting triangular graphs

Hi I need help, i have to plot a triangular graph as part of a lab assignment and i don't know how gotoxy(??...)!
Can anyone help me!

Comments

  • : Hi I need help, i have to plot a triangular graph as part of a lab assignment and i don't know how gotoxy(??...)!
    : Can anyone help me!
    :
    :
    Can you be more specyfic. I can't figure out you're problem. What did you mean with gotoxy(??...)?
  • : : Hi I need help, i have to plot a triangular graph as part of a lab assignment and i don't know how gotoxy(??...)!
    : : Can anyone help me!
    : :
    : :
    : Can you be more specyfic. I can't figure out you're problem. What did you mean with gotoxy(??...)?
    :
    Sorry it was very ambiguous, its a pascal program aswell i probably should have mentioned that(!), ok when when plotting a sin wave you have to input amplitude, frequency and phase as well as the number of points you want plotted end the program looks like this:

    begin
    for i : 0 to points-1 do
    val := amp*sin(2*PIE*freq*i/points+ phase);
    gotoxy(i+1, OFFSET - round(val));
    write('*');
    end;

    obviously there's stuff left out like actually getting the freq, amp etc inputted but you get the idea, so i how do change that program to plot a triangular wave?
    Thanks for your help
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories