Monday, May 24, 2010

Having problems executing a program with Dev C++?

ok, i'm a beginner. i typed up a source code from a book and put into into my compiler, Dev C++. There aren't any errors, but it just doesn't execute for some reason... take a look:


#include %26lt;stdio.h%26gt;


#include %26lt;stdlib.h%26gt;





int main()


{


char weight[4];


int w;





printf("Enter your weight:");


gets(weight);


w=atoi(weight);





printf("Here is what you weigh now: %d\n",w);


w=w+1;


printf("Here is what you weigh after the potatoes: %d\n",w);


w=w+1;


printf("Here is what you are after turkey: %d\n",w);


w=w+8;


printf("And your weight after dessert: %d pounds!\n",w);


printf("Lardo!\n");


return(0);


}

Having problems executing a program with Dev C++?
The problem may be with some of the compiler settings. If you are running Windows Vista, the default settings for Dev-C++ won't work. Check out the users forum at http://sourceforge.net/forum/forum.php?f...


No comments:

Post a Comment