Advertisement
rony-Rony_05

problemB

Jul 24th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int D,U,T,S;
  5.     scanf("%d %d %d",&D,&U,&T);
  6.     S = U*T + 5*T*T;
  7.     if(S>D+5)
  8.     {
  9.         printf("Hits a six\n");
  10.     }
  11.     else if(S<D-15)
  12.     {
  13.        printf("Not out\n");
  14.     }
  15.     else{
  16.         printf("Out\n");
  17.     }
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement