Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

plotting triangular graphs

Posts: 12Member
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!

· ·

• Posts: 156Member
: 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(??...)?
· ·
• Posts: 12Member
: : 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?