Advertisement
rahat62

Toph-Remember the Future

Jan 30th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main ()
  4.  
  5. {
  6.     int t,i,t1,i1,n,max=0;
  7.  
  8.     scanf("%d",&t);
  9.  
  10.     for(i=1;i<=t;i++)
  11.     {
  12.         max=0;
  13.         scanf("%d",&t1);
  14.  
  15.         for(i1=1;i1<=t1;i1++)
  16.         {
  17.             scanf("%d",&n);
  18.  
  19.             if(n<0)
  20.             {
  21.                 n=n*-1;
  22.             }
  23.             if(max<n)
  24.                 {
  25.                     max=n;
  26.                 }
  27.         }
  28.  
  29.         printf("Case %d: %d\n",i,max);
  30.     }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement