... HAVE U TRIED .... AT LEAST 3 TIMES ... OK U CAN SEE THIS ...

Tuesday, December 24, 2013

UVA-11805 :: Bafana Bafana

#include <stdio.h>
int main ()
{
     int n , k ,x   ,t ,i ,p ;
     scanf ("%d",&t) ;

     for (i=1 ; i<=t ;i++)
          {
               scanf ("%d %d %d",&n , &k , &p) ;
                x =(k +p) %n ;

                    if (x == 0) printf ("Case %d: %d\n",i ,n) ;
                    else  printf ("Case %d: %d\n",i ,x  ) ;
          }


return 0;
}