LAB_극장예약.c - #include <stdio.h>#define SIZE 10 int main(void char ans1 int ans2 i ans3 int seats[SIZE = 0 while(1 printf"�¼�

# LAB_극장예약.c - #include <stdio.h>#define SIZE 10 int...

• 3939filp
• 1
• 100% (1) 1 out of 1 people found this document helpful

This preview shows page 1 out of 1 page.

#include <stdio.h> #define SIZE 10 int main(void) { char ans1; int ans2, i, ans3; int seats[SIZE] = { 0 }; while (1) { printf(" ¼ ; ð � � �����Ͻ ڽ 4 ?(y n) "); ϱ� �Ǵ� scanf("%c", &ans1); printf(" ; ð ��� �����Ͻ ڽ 4 ?"); ϱ� scanf("%d", &ans3); if (ans1 == 'n') break; printf("--------------------\n"); printf(" 1 2 3 4 5 6 7 8 9 10\n"); printf("--------------------\n"); for (i = 0; i < SIZE; i++)

Unformatted text preview: printf(&quot; %d&quot;, seats[i]); printf(&quot;\n&quot;); for (int n = 0; n &lt; ans3; n++) { printf(&quot; ° ¼ ; ð ��� � � �����Ͻ ڽ 4 &quot;); ϱ� scanf(&quot;%d&quot;, &amp;ans2); if (seats[ans2 - 1] == 0) { seats[ans2 - 1] = 1; printf(&quot; Ǿ 4 .\n&quot;); ���� � ϴ� } else printf(&quot; �̹ � ����� � ڸ �� .\n&quot;); Դϴ� } getchar(); } return 0; }...
View Full Document

• Fall '19
• fdf

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes