i need help to write a source code in c++.
"draw the circle with ascii code(*)."
Pls help me
Send <[email protected]>
i need help to write a source code in c++.
"draw the circle with ascii code(*)."
Pls help me
Send <[email protected]>
Last edited by rifatgunduz; 01-25-2005 at 03:21 PM.
What do you think a circle looks like in ascii letters? Draw it in [ code ] [ /code ] tags and I'll help you from there.
Stupid things pop singers say
"I get to go to lots of overseas places, like Canada."
- Britney Spears
"I love what you've done with the place!"
-Jessica Simpson upon meeting the Secretary of Interior during tour of the White House
What I'm sure you meant to say, rather than just draw me a circle and I'll do it for you, is if you write your attempt, we'll be sure and give you pointers on how to do it. You see, we don't simply do people's work for them around here. Had the origional poster read the forum Announcements, including the one covering homework, they, and you, would know this.
Oh, and we don't simply hand out code via email to people either. Mmmm, cherry!
Quzah.
Hope is the first step on the road to disappointment.
I have a solution:
Code:#include <iostream> using std::cout; using std::endl; int main() { const char *_JEIORljksjdftkwerw[] = { " **** * **** * *", " **** * * *****", " * * * * *", " **** ***** ***** * *", " * * * * *" }; const int _JEIORljksjdttkwerw[] = { 3, 4, 0, 2, 1 }; double _JEIORljksjdfjkwerw = M_PI; double _JEIORljkxjdfjkwerw = _JEIORljksjdfjkwerw / 2; for (int _sjdflksj = 0; _sjdflksj < sizeof(_JEIORljksjdttkwerw) / sizeof(*_JEIORljksjdttkwerw); ++_sjdflksj) { cout << _JEIORljksjdftkwerw[_JEIORljksjdttkwerw[_sjdflksj]] << endl; } return 0; }
Hi,
If I was any good (one day, one day, crossing fingers) yes one day I will be a rich C++ programmer,
Anyway as i was saying, I know how rude people on here can be. *nods*. I find if i need a solution, buy about 5 different C++ books, go through them, and look at the bits that are relavent, books cant say no to you, and nor can web pages.
Anyway abck to day dreaming that I one day will be rich ££££ (i'm english! :P
lol I was just kidding. I'm not smart enough to do ASCII circles
try taking a graph paper and drawing a circle, but only draw points, and make sure those points are on the intersection of the graph lines. then look at all your points and try to find a relation between one point's location and the next ( pretty much the slope between the points, since you are not actually drawing a circle, but just points)
(i.e for a rectangle
Point 1) four up
Point 2) eight to the right
Point 3) four down
point 4) eight to the left
hope this makes some sense to you and might get something to click for you as to how to draw a circle on the screen. btw this is how my math teacher (dont ask why) showed me how to do it
Keyboard Not Found! Press any key to continue. . .
float fPointx=fOriginx+cosf(fAngle)*fRadius;
float fPointy=fOriginy+sinf(fAngle)*fRadius;
One method. After you draw 90 degrees of the circle you can have a complete circle if you compute the other points correctly.
Get the formula for a circle, and plot x and y using ASCII characters.
You're all waisting your time. Read the origional post. They don't want to know how to do it. They want it doen for them and sent to them via email. They're just another lazy bastard who wants everything handed to them. You all should be used to these types of people by now. It's a daily occurance.
Quzah.
Hope is the first step on the road to disappointment.
When all is said and done, everything has been said, and no homework has been done.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.