Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Basic Variables Video Question

I know this is very basic directly from the video, but I cannot figure out what is causing this to return the error 'Program ended with exit code: 9' when compiling. It's saying the breakpoint is at the 'return 0;' statement. Any clue why I'm getting this?

include <stdio.h>

int main() {

int days_in_a_week = 7;
float cm_to_in = 2.54;

char the_w;
the_w = 'W';


printf("%d days in a week.\n", days_in_a_week);
printf("%f cm per in.\n", cm_to_in);
printf("The %c is a cool hotel\n", the_w);

return 0;

}

2 Answers

Holger Liesegang
Holger Liesegang
50,595 Points

Hi Timothy,

your code seems to be ok. Maybe you accidentally added a breakpoint? If there is a blue arrow in the gutter next to your code just drag it away to delete it.

Kind Regards Holger

Perfect. Thanks