Hello,

I'm almost completely useless at C, and as part of a project I've got to conjure up a programme, and I'm just hoping someone can give me push to get it started.

I want to make a programme where the user can draw a CIRCLE, SQUARE, LINE and POLYGON (and eventually any polygon) by setting the size or the starting X & Y and ending X & Y and radius.

My professor gave us a clue, we have to use printf and scanf

This what our professor gave to us, : clue:

......
printf("SQUARE");
printf("starting X: ");
scanf( );
...
printf("starting Y: ");
scanf( );
...
printf("ending X: ");
scanf( );
...
printf("ending Y: ");
scanf( );
...

printf("CIRCLE");
printf("starting X: ");
scanf( );
....
printf("ending Y: ");
scanf( );
...
printf("radius: ");
scanf( );
....


printf("LINE");
printf("starting X: ");
scanf( );
....
printf("starting Y: ");
scanf( );
....

printf("POLYGON");
printf(" ");
scanf( );
*rest of the code here*

I don't have really have any idea about this programme, even my classmates can't do it.
So we have to research but we can't find it in our library neither on google.

I'm just asking for a bit of help to get started. :'(

I hope you guys can help me, :'(

and I understand if you don't give away code because I'm not showing my effort. Just a bit of help. :'( Really need it to pass tomorrow. :'(:'(:(:(:'(

Comments
you used 6 cry-faces and 2 sad-faces in your first post. that's just fail.

I gave you explicit instructions on how to get started in graphics mode, but you've ignored them, and just now you're posting up some half-baked lines of code with no logic in them, as a "clue". And they're not even from you!

My first "clue" is that you won't have the assignment done by tomorrow, having done such a lousy effort, so far. My second "clue", is that you will not pass your class, because programming involves a lot of work - and you have not shown any.

You have a great resource here, and I was looking forward to working with you on this, but you won't work. I feel like I've been kicking a dead horse here, and I'm tired of it.

Goodbye.

Edited 6 Years Ago by Adak: n/a

Comments
Nice one!
Agree :)
Bravo :)
Yes

as part of a project I've got to conjure up a programme,

"Conjure a program" ... Interesting choice of words.

Rather viewing your exercise as needing to write a program, you see it as an attempt to magically produce one from the ether.

And begging and wheedling has replaced the ritual incantations of yore.

Comments
lol, Didn't notice those choice words.

well using the Scan f means it will copy the programm,
i will advised to you, that you may used the printf to display to the user screen the graphics.

This article has been dead for over six months. Start a new discussion instead.