1.

Solve : Correcting a program?

Answer»

Can somebody help me fix this program? Thanks!
Code: [Select]#include <conio.h>
#include <iostream.h>
int main()
{
cout << " *:+++++*##.+#@########***###@ " << endl;
cout << " +:++++++##W*#+W########@#***#@#### " << endl;
cout << " *:.++***###[emailprotected]##[emailprotected]#######@#**###*#@ " << endl;
cout << " .#:.:+*****#[emailprotected]@##**#####*#@ " << endl;
cout << " .,##:::*******######@#####*# " << endl;
cout << " ,..+##:+:*******#############**####@#####**#@ " << endl;
cout << " :...+:@#*:++*****############****#######@###**# " << endl;
cout << " .....:::@#+++****############****######**## " << endl;
cout << " :.....:::[emailprotected]@##*+++***##########*********# " << endl;
cout << " :......::+*::::####+::++*******## " << endl;
cout << " :.:...::*::::******@###@*:: " << endl;
cout << " :....:::.::**:::::***::::::*+:::*:*:+ " << endl;
cout << " :..:::::,,*::::::::::*::::*::::::**++ " << endl;
cout << " ::...:+:,,,,,:::::::::::::::::::::*++ " << endl;
cout << " :...:::,,,,,,WWWWWW:::::::::WWWWW:#+* " << endl;
cout << " ***:+::,,,,WWWWW+WWW:::::::WWW*WWW#** " << endl;
cout << " *.,:+:+,,,W+:W#W W+W,,,::::[emailprotected]:W*W#** " << endl;
cout << " *,,,+:+,,,W+ W#W#W:W,,,,,,,W#[emailprotected]+W+:* " << endl;
cout << " *,:+,,+,,,*: W*W#W *,,,,,,,:*W#W*W+:* " << endl;
cout << " +,,.+,+,,,,*WW***W ,,,,,,,, ***WW+++* " << endl;
cout << " +,,,.,,,,,,,,*WWW#*,,,,,,,,*WWW,.+:* " << endl;
cout << " *.,,.:,,,,,,,,,,,,,,,,,,,,,,,,,,+** " << endl;
for(int w=1;w<=22000;w++)
{
gotoxy(1,1);
cout << " *.:++++**#@#[emailprotected]#######@#######@ " << endl;
cout << " *:+++++*##.+#@########***###@ " << endl;
cout << " +:++++++##W*#+W########@#***#@#### " << endl;
cout << " *:.++***###[emailprotected]##[emailprotected]#######@#**###*#@ " << endl;
cout << " .#:.:+*****#[emailprotected]@##**#####*#@ " << endl;
cout << " .,##:::*******######@#####*# " << endl;
cout << " ,..+##:+:*******#############**####@#####**#@ " << endl;
cout << " :...+:@#*:++*****############****#######@###**# " << endl;
cout << " .....:::@#+++****############****######**## " << endl;
cout << " :.....:::[emailprotected]@##*+++***##########*********# " << endl;
cout << " :......::+*::::####+::++*******## " << endl;
cout << " :.:...::*::::******@###@*:: " << endl;
cout << " :....:::.::**:::::***::::::*+:::*:*:+ " << endl;
cout << " :..:::::,,*::::::::::*::::*::::::**++ " << endl;
cout << " ::...:+:,,,,,:::::::::::::::::::::*++ " << endl;
cout << " :...:::,,,,,,WWW,:::::::::::WWWWW:#+* " << endl;
cout << " ***:+::,,,,WWWWWW::::::::::WWWWWWW**+ " << endl;
cout << " *.,:+:+,,,,,,WW,,,,,,::::,,,,WW,,,**+ " << endl;
cout << " *,,,+:+,,,,,,,,,,,,,,,,,,,....,,,++:* " << endl;
for(int x=1;x<=22000;x++);
gotoxy(1,1);
cout << " *:+++++*##.+#@########***###@ " << endl;
cout << " +:++++++##W*#+W########@#***#@#### " << endl;
cout << " *:.++***###[emailprotected]##[emailprotected]#######@#**###*#@ " << endl;
cout << " .#:.:+*****#[emailprotected]@##**#####*#@ " << endl;
cout << " .,##:::*******######@#####*# " << endl;
cout << " ,..+##:+:*******#############**####@#####**#@ " << endl;
cout << " :...+:@#*:++*****############****#######@###**# " << endl;
cout << " .....:::@#+++****############****######**## " << endl;
cout << " :.....:::[emailprotected]@##*+++***##########*********# " << endl;
cout << " :......::+*::::####+::++*******## " << endl;
cout << " :.:...::*::::******@###@*:: " << endl;
cout << " :....:::.::**:::::***::::::*+:::*:*:+ " << endl;
cout << " :..:::::,,*::::::::::*::::*::::::**++ " << endl;
cout << " ::...:+:,,,,,:::::::::::::::::::::*++ " << endl;
cout << " :...:::,,,,,,WWWWWW:::::::::WWWWW:#+* " << endl;
cout << " ***:+::,,,,WWWWW+WWW:::::::WWW*WWW#** " << endl;
cout << " *.,:+:+,,,W+:W#W W+W,,,::::[emailprotected]:W*W#** " << endl;
cout << " *,,,+:+,,,W+ W#W#W:W,,,,,,,W#[emailprotected]+W+:* " << endl;
cout << " *,:+,,+,,,*: W*W#W *,,,,,,,:*W#W*W+:* " << endl;
cout << " +,,.+,+,,,,*WW***W ,,,,,,,, ***WW+++* " << endl;
cout << " +,,,.,,,,,,,,*WWW#*,,,,,,,,*WWW,.+:* " << endl;
cout << " *.,,.:,,,,,,,,,,,,,,,,,,,,,,,,,,+** " << endl;
}
return(0);
}
I'm a beginner by the way and need help as soon as possible. I'm USING Turbo C++.
Here's a neater version:


[attachment DELETED by admin]If that is a *censored* picture, we can not help you! it isn'tI thought C++ required ending QUOTES. Is that not true?
THEE is a lot of wasted spaces.
Would you not want to compress it?
That is a terminal program, right?



Discussion

No Comment Found