Your code is giving these output.
input:
1:59
1:01
your output:
-0.000
-36893488.....something.
But the output should be:
65.500
24.500
Try to use fabs function from math.h
and visit this page http://en.wikipedia.org/wiki/Clock_angle_problem
remember angle is always <=180.000
Search found 2 matches
- Sun Mar 13, 2011 6:50 pm
- Forum: Volume 5 (500-599)
- Topic: 579 - Clock Hands
- Replies: 44
- Views: 22734
- Fri Feb 18, 2011 10:44 pm
- Forum: Volume 7 (700-799)
- Topic: 755 - 487--3279
- Replies: 115
- Views: 47760
Re: 755 - 487-3279
Hello, Can anyone help me to fix my problem with this code cause i'm getting WA with this solution.
Here is my code....
#include<stdio.h>
#include<string.h>
#include<vector>
#include<ctype.h>
#include<algorithm>
using namespace std;
#define pb push_back
vector<int> vec;
int main(){
int t,n ...
Here is my code....
#include<stdio.h>
#include<string.h>
#include<vector>
#include<ctype.h>
#include<algorithm>
using namespace std;
#define pb push_back
vector<int> vec;
int main(){
int t,n ...