//(|60a-11b|)/2,時間變角度
#include<stdio.h>
int main(){
float hour,minute,angle;
printf("請輸入時\n");
scanf("%f",&hour);
printf("請輸入分\n");
scanf("%f",&minute);
angle=(60*hour)-(11*minute);
if(angle<0){
angle*=-1;
}
printf("角度是%f°",angle);
system ("pause");
return 0;
} |