Canna

Tuesday, 25 September 2018

Tick Tick Tick

  • Problem Description


    Hemas teacher give one assignment to him. she should write a code to find the time entered in hours, minutes and seconds into seconds. Help him to solve this task
  • Test Case 1

    Input (stdin)
    2 30 4
    
    
    Expected Output
    9004
  • Test Case 2

    Input (stdin)
    10 5 60
    
    
    Expected Output
    36360
  • Program
  • #include <stdio.h>
    int main()
    {
    int a,b,c,d;
    scanf("%d%d%d",&a,&b,&c);
    d=(a*60*60)+(b*60)+(c);
    printf("%d\n",d);
     return 0;
    }

No comments:

Post a Comment

Note: only a member of this blog may post a comment.