Advertisement
Sadiy_Irin

Clock Math

Apr 29th, 2021
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include<iostream>
  2. #include<iomanip>
  3. using namespace std;
  4. int main()
  5. {
  6. int h,m;
  7. cin>>h>>m;
  8. double angle;
  9. angle = (360-(h*30)+((m/5.0)*30)-(m*30)/60.0);
  10. cout<<fixed<<setprecision(7)<<angle<<endl;
  11.  
  12. return 0;
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement