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!
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

Timothy Foster
Courses Plus Student 1,320 PointsObjective C else if and switch error
getting ")" expected on all printf lines yet they look the same as the instructor has done
2 Answers

Timothy Foster
Courses Plus Student 1,320 Pointsinclude <stdio.h>
int main() { char a = 'a'; char b = 'b'; char g = 'g';
char letter = 'z';
switch (letter){
case 'a':
printf("letter %c is %c\n", letter a);
break;
case 'b':
printf("letter %c is %c\n", letter b);
break;
case 'g':
printf("letter %c is %c\n", letter g);
break;
default:
printf("letter is not found\n" letter);
break;
}
return 0;
}

Timothy Foster
Courses Plus Student 1,320 Points.

Jason Anello
Courses Plus Student 94,610 PointsIt looks like you're missing commas between your arguments to printf.

Timothy Foster
Courses Plus Student 1,320 Pointsthank you, don't know how I missed it on the video.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsCan you post your code?