Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int a[5]={0},i;
- char c;
- while(1)
- {
- printf("Input you Party :\n");
- printf("1: A\n");
- printf("2: B\n");
- printf("3: C\n");
- printf("4: D\n");
- printf("5: E\n");
- printf("Party : ");
- scanf(" %c",&c);
- if(c=='1')
- {
- a[0]++;
- printf("You'll Select Party Again. (Y/N) : ");
- scanf(" %c",&c);
- if(c=='n'||c=='N') break;
- }
- else if(c=='2')
- {
- a[1]++;
- printf("You'll Select Party Again. (Y/N) : ");
- scanf(" %c",&c);
- if(c=='n'||c=='N') break;
- }
- else if(c=='3')
- {
- a[2]++;
- printf("You'll Select Party Again. (Y/N) : ");
- scanf(" %c",&c);
- if(c=='n'||c=='N') break;
- }
- else if(c=='4')
- {
- a[3]++;
- printf("You'll Select Party Again. (Y/N) : ");
- scanf(" %c",&c);
- if(c=='n'||c=='N') break;
- }
- else if(c=='5')
- {
- a[4]++;
- printf("You'll Select Party Again. (Y/N) : ");
- scanf(" %c",&c);
- if(c=='n'||c=='N') break;
- }
- else printf("\nPlease Input Your Party Again.");
- printf("\n");
- }
- for(i=0;i<5;i++)
- {
- printf("Party %c Score : %d\n",65+i,a[i]);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement