Advertisement
Rehan_Rahman26

1

Jun 18th, 2021
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.77 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(){
  3.     int a,b,c,d,e,i,n;
  4.     while(1){
  5.         scanf("%d",&n);
  6.         if(n==0) break;
  7.         else{
  8.             for(i=1; i<=n; i++){
  9.             scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);
  10.             if((a<=127) && (b<=127) || (a<=127) && (c<=127) || (a<=127)&&(d<=127) || (a<=127) && (e<=127) || (d<=127) && (e<=127) || (b<=127) && (c<=127) || (b<=127) && (d<=127) || (b<=127)&&(e<=127) || (c<=127) && (d<=127)  || (c<=127) && (e<=127))
  11.             printf("*\n");
  12.            
  13.             else if(a<=127) printf("A\n");
  14.             else if(b<=127) printf("B\n");
  15.             else if(c<=127) printf("C\n");
  16.             else if(d<=127) printf("D\n");
  17.             else if(e<=127) printf("E\n");
  18.             }
  19.         }
  20.     }
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement