Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 20th, 2005, 7:09 PM   #11
Benoit
Expert Programmer
 
Benoit's Avatar
 
Join Date: Sep 2004
Location: Ontario, Canada
Posts: 555
Rep Power: 5 Benoit is on a distinguished road
Quote:
Originally Posted by davidguygc
where do i get it?
bloodshed.net
__________________
Johnny was a chemist's son but Johnny is no more, for what Johnny thought was H2O was H2SO4
Benoit is offline   Reply With Quote
Old Mar 20th, 2005, 9:48 PM   #12
davidguygc
Programmer
 
Join Date: Mar 2005
Location: Lubbock, TX
Posts: 30
Rep Power: 0 davidguygc is on a distinguished road
well i've tried all these ways, and it still immediately closes, and i really dont want to open it up through cmd.exe
davidguygc is offline   Reply With Quote
Old Mar 20th, 2005, 10:26 PM   #13
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
Post the code.
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote
Old Mar 20th, 2005, 11:15 PM   #14
davidguygc
Programmer
 
Join Date: Mar 2005
Location: Lubbock, TX
Posts: 30
Rep Power: 0 davidguygc is on a distinguished road
solved

I'm really glad you asked me to put the code, because it now is working, even though i had that blasted getchar(); in there, heres the code still if you could figure out why it mighta done it:
#include <stdio.h>

int main()
{
	char a,b,c,d,e;
	int aa,bb,cc,dd,ee;

	printf("Press Enter");
	getchar();

	for(aa=0;aa<=2000;aa++)
	{
		for(a='A';a<='Z';a++)
		{
			printf("%c\n",a);
		}
		
		a='D';
	}
		
	for(bb=0;bb<=2000;bb++)
	{
		for(b='a';b<='z';b++)
		{
			printf("%c%c\n",a,b);
		}
		b='a';
	}

	for(cc=0;cc<=2000;cc++)
	{
		for(c='a';c<='z';c++)
		{
			printf("%c%c%c\n",a,b,c);
		}
		c='v';
	}

	for(dd=0;dd<=2000;dd++)
	{
		for(d='a';d<='z';d++)
		{
			printf("%c%c%c%c\n",a,b,c,d);
		}
		d='i';
	}

	for(ee=0;ee<=1985;ee++)
	{		
		if(ee<=1985)
		{
			for(e='a';e<='z';e++)
			{			
				printf("%c%c%c%c%c\n",a,b,c,d,e);
			}
		}
		if(ee==1985)
		{
			for(e='z';e>'a';e--)
			{
				if(e>='e')
					printf("%c%c%c%c%c\n",a,b,c,d,e);
				if(e=='d')
					break;		
			}
		}		
	}
		
	printf("\n%c%c%c%c%c\nFound It!\n\n",a,b,c,d,e);
	
	printf("Press Enter");
	getchar();
}

Thanks for y'alls help
David
davidguygc is offline   Reply With Quote
Old Mar 20th, 2005, 11:57 PM   #15
Ramlag
Newbie
 
Join Date: Mar 2005
Posts: 18
Rep Power: 0 Ramlag is on a distinguished road
Another thing you could allways do if you didnt want to edit the code, is run the command prompt (assuming you are using windows) and run the exe through that (drag and drop works too). That way it should stay open and you wont have an extra line in your code.
Ramlag is offline   Reply With Quote
Old Mar 21st, 2005, 10:10 AM   #16
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Before getchar();, bung this line in:
fflush(stdin);
That'll wipe the input buffer.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 21st, 2005, 10:23 AM   #17
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
#include <stdlib.h>
...
...
...
system("PAUSE");
...
...
...
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Mar 21st, 2005, 10:51 AM   #18
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
According to the great Eggo, that's a bad idea, because people can screw around with the "pause" command to bugger up your app.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Mar 21st, 2005, 3:06 PM   #19
lostcauz
Hobbyist Programmer
 
Join Date: Nov 2004
Location: 1691 miles East of L.A.
Posts: 159
Rep Power: 4 lostcauz is on a distinguished road
I code in Notepad then use gcc to compile and run from the command prompt.
__________________
-- lostcauz

Stepped in what?...
Behind whose barn?...
I didn't even know they had a cow!
lostcauz is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:03 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC