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 taskTest Case 1
Input (stdin)2 30 4
Expected Output9004
Test Case 2
Input (stdin)10 5 60
Expected Output36360
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.