graphing calculator
chaseC

Hi, I'm trying to make a simple graphing calculator. To make it easier I just decided to make it so you enter the x and y positions of the 2 dots instead of using the standered y = mx + b equation. The problem is that I'm new to allegro and I don't know how to make it so that you enter a variable, it shows that variable, and then you enter the amount for another variable. So basically I want the program to look something like this. >>

enter the X position for first dot: variable
enter the Y position for first dot: variable2

enter the X position for second dot: variable3
enter the Y position for second dot: variable4

Graph will go here

.
.
dot 1
.
.
dot 2
.
. <- line

James Stanley

You would get a reply if you actually asked a question. From where I'm standing (sitting...), it looks like you just want people to write your program for you.

Matthew Dalrymple
Quote:

The problem is that I'm new to allegro and I don't know how to make it so that you enter a variable, it shows that variable, and then you enter the amount for another variable.

You have to make your own input... to do so, try using either readkey() or key
Reference

To show the variable .. see textprintf_ex()
Reference

You are probably going to have to convert a string to a number so look up atof() or atoi() or so.

But since you are asking pretty much asking people to do this for you, as James stated, you probably won't get how to use this help. Maybe you just needed a little push through the door to get started, hopefully that is the case and this will help. I think everyone here recommends http://www.allegro.cc/manual/ Go through that and click each link and read what each thing does. You don't have to really understand it at this moment in time. As you move along and want to do something your brain might trigger and be like "I think there was something in the manual about that."

Thread #590679. Printed from Allegro.cc