Advertisement
rahat62

Toph-Ha Ha Ha

Jan 31st, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<math.h>
  3. int func(int ab, int ac)
  4. {
  5.     return pow(ab,2)+pow(ac,2);
  6. }
  7. int main()
  8. {
  9.     int t,i,ab,ac,result;
  10.     scanf("%d",&t);
  11.     for(i=1;i<=t;i++)
  12.     {
  13.         scanf("%d",&ab);
  14.         scanf("%d",&ac);
  15.         result =func(ab,ac);
  16.     printf("Case %d: %d\n",i,result);
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement