Sunday, May 12, 2019

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

Parity

Problem Description Ram and Sita playing the parity game. Two types of parity are there. One is odd parity and next is even parity. Ram will...