Toggle navigation
Courses
Questions
Tags
Users
AC 20161201 第二次期中考 第二題
0
like
0
dislike
4.7k
views
時鐘上有時針有分針,分針每一分鐘跳一次,分針每跳一次時針也會前進相對應的角度。請設計一程式,由使用者輸入一個時間,程式會計算出時針與分針間的夾角後輸出。
輸入說明:輸入包含兩個正整數,兩個數之間由一個空白隔開,第一個數字代表時,第二個數字代表分。
輸出說明:請輸出時針與分針間較小的那個夾角。
輸入範例:
12 31
輸出範例
170.5
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18067 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
reshown
Dec 1, 2016
by
Shun-Po
|
4.7k
views
comment
Please
log in
or
register
to add a comment.
62
Answers
0
like
0
dislike
Hidden content!
* ** * ****** * ****
int main()
{
** * * * ** h,m ;
* ** *** * * * *** *** ****** * *** *** ** **** ;
** * * * * * ** * r ;
* * **** * *** *** *** !=12) r = (h*30)-(5.5*m) ;
*** ******* *** * r=(5.5*m) ;
** * ** * * * ** *** r = 360-r ;
** * * ** ** r= -r ;
* ** ** * ** *** * ** * * * *** * ;
** *** ***** *** ** 0 ;
}
answered
Dec 1, 2016
by
luxinyu
(
-88
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
# include <stdio.h>
# include <ctype.h>
int main()
{
* ** *** **** * **** **** hour,min;
** * * * ***** ** *** * * * * * * * **** *
** *** ** ** * *** **** *** ** i,j,degree;
*** * * * ** **** ** *** **** *
* * * ** * * * *
* ***** * * ** ** ** * *
***** ** ******** * * (degree>180)
** **** * **** *** ** * * * * **
** * * * ** * ** ** ** * ****
* *** ** * * * ** ******** ** ** ** * ** *
** * ** * ** *** ***** *
* * ********* ** ** ** * *** *** **** ***
}
answered
Dec 1, 2016
by
410425016
(
-124
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* * *** * * * ***
** * ** ** ** *
void rect(int ,int,int *);
int
{
* * * * * * a, b;
* * * * *** ** *** * * *** * *** * **** *
***** * * * ** ** ** *** * ** * 0;
}
void rect(int x,int y,int*p1)
* ** *** * ******
* *** ** * * * **** ***
* * ** * * * * **
answered
Dec 1, 2016
by
410425044
(
-114
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* ******** *
** * * * ** *** ** *
int main()
{
int a,b,c;
* * ***** * ** * ** * * * * ** * ** * *
if(a=12)
* * ** ** **** *
* **** * **** * ** * **
* * *** *** ** ** *** ****** ***
* ** * * ** **
* *** * **
* * **** ** * ** * *** * ** * * * ((a*5+b/12)-b)*6;
*** * ** * * * ** ***** * *
* ************** *** ****
** * * ** * * * *
return 0;
}
answered
Dec 1, 2016
by
李奕叡
(
-143
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
# include <stdio.h>
# include <stdlib.h>
int main()
{
double a,b,c,d,e,k,j;
scanf("%lf",&a);
scanf("%lf",&b);
if(a == 12)
{
c = (b/60)*30;
d = b*6;
e = d-c;
** *** ** * **** * * ** * ** * ** * **** * * * * ** ******* **** ** **** ***
* * * ** * * ***** *** ****** * ** * ** *** * *** **** *
**** * *** ** ***** *** * *** * *** * * * * * * *** *** ***** **** * * ** * ** ** * * *
*** **** **** *** * *** * **** * * **** * ***** ** ** * *** * * **** *
** ** * * * * ** ***** ** * * * * * * **** ** ***** * * * *
* *** ** * ** ******** ** *** *** * ***** * * ** * *** * *** ** * * *
* *** ** * ** * *** * ***** ** ** **** *** * ******** ** * *** ******** ** * * *** ******** ** * ** *
* ** ** * *** ** * **** *** * ** * ******** *** * * * *
* *** * * ** *** **** * * * ** **** ***** **** **** * ******
** * ** ** **** ** * * ** * ** *** * *** ****** ** * ** ** * *** * * j<k)
* * *** * *** ** * ***** * * ** *** *** ** * * * * ** * * *** * ** *** * *
* ** * *** ***** * *** *** * *** * * * ** * * *** * * * * ** ***** ** ** ** * * * *** * ****** * ** * * ** *
** * ** * * ** ** ***** * * ***** * *** * ** ** * ***** * * ** ** * ** * * * * ** ** * **
** ** *** * * *** *** * * * * ** ** * *** **** * *** * ** * * * *
*** *** *** ** * * ** ****** ** * ***** *** ** *** * ** ******** * ** ** ** ** ****
* * ******** ** *** * ** * * ** ** * * * * * * * ** * **** * ** ** ** ***** ** ** ** * * ** * * ****** *
** * * ** * * ** ** ** * * **** * * **** *** * * ** ** * * * * ** * *** * **
}
else
{
* **** * ** * * * *** * ***** ** * * ** ** * **** ** * ****** *** ** = (b/60)*30+(30*a);
* * *** * ***** ****** * *** ****** ******** ** *** * * * ** ** ** = b*6;
*** * * * * * * * * ** * ****** ** * *** ** ** * * * *** **** * * * ** = d-c;
*** ** * **** * * ** * * * * **** ***** ** **** * * * *** * ** *** * * * ** **
**** * **** * * * * ** * **** * *** * ** ** *** ** ** * ** * * ** ** **
*** *** ****** **** ****** * ** ** ** * * * * * ** * *** ** * * * ** *** *** *** ** * *
** * * * * * ** * * * * ** ** ** ** * * * ** * * *** ** * * * *
* *** * **** ** ** * * * ***** * *** **** * ***** * * * * **
* * ** * * * *** * * * * ** * * ** * * * * *** * * * * ****
**** *** * * * ** * *** * * ** **** * * ** *** * * * ******* * * *** * * *** ** * *
* **** ** * * ** ***** **** * ** *** * * ** * * * * * * * ******
** * * *** *** ** ** ** ***** *** * *** * * * *** ******** ** * * ** *
* * ** ** ** * * * * ** * * * * * ** *** * * *** ** * **** * * ** * * j<k)
* * * * ***** ** * ***** * * ** * * *** ** ** **** * * *** ****** * * **** ****** * ** * * *
* ******* * * * ** *** *** ****** *** *** ** ***** * * * *** * ** ** ** * ** * ** * * * * *** *** ** * * ** * ** * * *** *
* *** * * * ***** * **** ** ** * ** * ** * * ***** ***** **** **** **** ** * ** * * *
*** * * * *** * ** ** ** ** * * ** * * ** *
* * * * **** ******* * ** **** * **** * * * **** * **** * ** * * ** **
** * ** * * * *** ** ** * * ** *** * * * ** ** * ***** ** * * * * *** * * *** * ***** *** ** ** * * ******
* * * ** ** * ** ** **** *** ***** ** ***** **** ** ** ** ** **** ** ** ** * *
}
return 0;
}
answered
Dec 1, 2016
by
410523012
(
-158
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* * ** ** * **** **
#include * **** **
double angle(int hour,int min)
{
** * h,m,ret;
****** ** *** *
* * *****
** ***** *
** * ** ***** *** **
* ***** * ret;
}
void main()
{
** ** * h,m;
* * **** ** * * * * * * hour(0~11) and * * * **
** * ** * ** ****
*** ** ** * ** **
{
**** * ******* ** * * * * hour(0~11) and * * * **
* * ** * * * **
* *
***** *** ** ** *
**** ** **** * * **
{
* * * *** *** * * * * * * and ** * * ** **
* ** **** ** *
}
* ****** ** **** * ** * angle ** * ****** * * * *** * ** *
}
answered
Dec 1, 2016
by
410425045
(
-90
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
# include <stdio.h>
# include <stdlib.h>
int main()
{
double a,b,c,d,e,k,j;
scanf("%lf",&a);
scanf("%lf",&b);
if(a == 12)
{
* * **** ****** * *** ***** ** * ** * *** * ** ** *** * = (b/60)*30;
* **** * * ** ** **** * * ** *** * **** *** * *** * ** ** **** * * * ** = b*6;
* * ** **** ******** * * *** * ** * * * **** ** * * *** * * * * * * = d-c;
* * * * * ** **** *** * * * *** **** * * * ** = abs(e);
* *** * * * * * **** ***** ** * * * *** * *** * * * * ** **** **
* *** ** ** * * ******* * ** ** * *** ** ** *** ****** ** * *** ** j<k)
** * * * * * * *** * * * * * * * * *** * * *** * * * * * ** * ***** * * *** ** * * ** * **
** * * * * * ** ** ***** *** * * ** * *** * *** * * *** * **** * * ** *** * * * ** *** * ** ** * * * *** ** *
* * * ** ***** ** * * * * *** ** * ** *** *** * **** * ** * * * ** ** *** ***** * * ** * *
** * * * * * ** * * ** ** **** ** * ** ** **
** * **** *** * *** * * ** ***** * *** **** * ****** * ** * *** * * * *** * **
* * * * ** ***** * *** ** * * * ****** * ** * ** ***** **** *** ** **** * * ***** ** * * * **** ** * * * ** ** * ** * * * *** *
* *** *** * * * ** * * * * ** *** ****** * * *** * * *** * * * * ** * * * *
}
else
{
* ** * ******* ** * ** * *** ** ** * ** * * * * *** * * * ** = (b/60)*30+(30*a);
* * ***** * * * ** ******** * * * ** * * * ** ** **** * **** ***** = b*6;
** ** ** ******* * * * *** * ** **** *** * ** ** * * ** **** ** * = d-c;
* *** * ** * * ** * ** ** *** * * ** ** * **** **** * * ***** * ** ** = abs(e);
* * * * * *** * ** * * **** * * ** * * ** * ** * * ****** ****** ** *****
**** * ***** ** *** ** * ** * * * * * ** * *** *** * ********** * ** * j<k)
** * * * * * ** * ****** * ** **** * * **** *** **** * * * ** ** * * * ** * * ** ** * *
* **** ** ** ***** * *** ** * * ** * * ** * ****** *** ** ** ****** * ** * ** * ****** *** * *** * * * * ** * ** ***** **
* * ** *** ***** * **** * * ** * * * ** ** * * ** *** * **** * **** * *
** ** * * * * * * * ** ** *** ** * **** * *** * ***
* *** * *** ** * * **** * * * ***** * * * * ** * ****** ** * * * *
** ** *** * *** * ** * ****** * ******* * * **** ** * *** * * * ******* ** * * * * * * *** * * ** * *
*** * * * * * *** *** **** *** **** * ** *** * ** * * * * * ** * * * * * * *
}
return 0;
}
answered
Dec 1, 2016
by
410523012
(
-158
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
***** * ** * **
** * * * ** ****
** * *** * * * **
** ** **** **
** ( ** )
{
* * ***
* **
* ** * * * * ** ****
*** * * ** * * ** *
d = 6 * b;
e = * * b + 30 * a;
* ** * ** * % 2 != 0)
* * ** *
* ****** ** * = d - e;
** ** * ** * (c * ** * {c = ** - * **** * *** ** * *
**
{
*** **** * * * = e - d;
* *** * **** ** (c **** * ** = - * **** * * ***** *
***
* *
*
** ** * * * ** * ** *
*
** * ** * ** ** = d -
* * ****** ** * ** * ***** * * = ** - ******* * *** * ***
*
*
{
* *** * ** ** = e - d;
** ** * * * (f * {f = ** - * * ** * *** *
}
}
** 0;
}
answered
Dec 1, 2016
by
410523022
(
-276
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
# include <stdio.h>
# include <stdlib.h>
int main()
{
double a,b,c,d,e,k,j;
scanf("%lf",&a);
scanf("%lf",&b);
if(a == 12)
{
* * ** * ** * * ** * ** ***** ** * * ** * **** * * ** ** **** *** * * * = (b/60)*30;
**** * ***** *** * ** ** ** **** * * * * * ******* ** ** = b*6;
* *** * ** * ** * ** * *** *** ***** ***** ** *** **** *** = d-c;
** * * ** * *** ** * **** * * ** **** * *** * *********** ** *** = abs(e);
**** * *** ** * * * ** ** ** * * **** ** **** * * ** **
** *** * * ** * * * **** * ****** **** * *** ** * * ** ** e<k)
**** * * **** * *** * * * ** **** * * *** * ********* ** * * * ** ** ** * ** **** *
* * **** ** ***** * * * * ** * **** ** *** ** ** * ** *** * * *** ** ** * ***** * *** * ** ** *** * *** * * ***** * *** ***** *
** *** *** * *** * *** **** ** ** *** * ** ** ***** ** * *** ** ** * * ** * *** *
* **** ** * **** * **** * ** ** ***** ** * * * * * *
* *** * **** * *** ** * ** **** * *** ** ** ** *** * * ** **** **** * ** ** * ** **** * * * *
* **** * ** ** ****** * *** * *** * * * * ** * ** *** * * *** ** * * * * * *** **** **** * * ** * ** * * ** * * * *
* * * * * ** * * ******* * * * ** ** * * * ** * ******* ********* ***** * **
}
else
{
** * * ** ** * * * **** **** ****** * ** ** *** **** * *** * **** * * = (b/60)*30+(30*a);
* **** * ** *** ** * * *** * ***** * * * * ***** ** * ********* * = b*6;
* ** ****** * ***** * * * **** *** **** ** ** ** ** **** **** ** * * * = d-c;
* * ** ** * ** * ******** * * ** * * * ** * ** * * * **** * ** * * = abs(e);
****** *** * * * * * * **** ** ***** **** *** ** *** * ** *** ***
* ** ** ** ** ** ** ** **** ** * **** ** ** ** ** * ** * **** * * * e<k)
*** * * ******* * * **** ** **** ** * ** * *** * * *** * * **** *** ** * * ***
** * ** ** * ** ****** * *** * * * * * *** * * ***** **** ** *** ** ** ***** *** ** ** * * * * *** * ** ** * *** * * *
* * * * ***** ** * * * * **** **** * ** * **** * * ** ** *** ** * ****** * ***** **
*** * ******** ** * **** ** * * ** ** * * ** * * *** * * *** ** * *****
***** ** * ** *** * ** * ****** **** * * * * * * ** * *** * * * * ******* * **
** * * * * *** * * ** ** ** **** ** *** **** * * * * *** **** * ** ***** ** ** ** * ******* * * * ** **** ** ** **
* * * *** ***** **** * *** * * ** *** * *** **** * *** * * * ** **** **** * **** *
}
return 0;
}
answered
Dec 1, 2016
by
410523012
(
-158
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
# include <stdio.h>
# include * ***** *
int main()
{
* *** *********** * hour,min;
** * * ** * ****** * * * *** * * * * * * * * * *
*** ** ** *** *** i,j,degree;
**** *** * ** **** ** ** * *
*** ** * * ** * *** * * *
** * ** ** * *** ** ***
* ** * * * **** * * (degree>180)
* * * ** * *** * * **** *
* ** *** * * ** * * * * * * * * **
}
answered
Dec 1, 2016
by
410425016
(
-124
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Page:
« prev
1
2
3
4
5
...
7
next »
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:172.71.254.164
©2016-2025
Related questions
0
like
0
dislike
16
answers
AC 20161201 第二次期中考 第五題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18075 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
|
2k
views
0
like
0
dislike
86
answers
AC 20161201第二次期中考 第四題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18071 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
|
6k
views
0
like
0
dislike
49
answers
AC 20161201 第二次期中考 第三題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18070 -
Available when:
Unlimited
-
Due to:
Unlimited
|
3.5k
views
0
like
0
dislike
21
answers
AC 20161201 第二次期中考 第一題
[Exercise]
Coding (C)
-
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18066 -
Available when:
2016-12-01 18:30:00
-
Due to:
2016-12-01 21:00:00
|
2k
views
0
like
0
dislike
0
answers
AC 20161201 第二次期中考公告
[Resource]
asked
Dec 1, 2016
in
2016-1 程式設計(一)AC
by
Shun-Po
(
18k
points)
ID: 18085 -
Available when:
Unlimited
-
Due to:
Unlimited
|
10
views
12,783
questions
183,442
answers
172,219
comments
4,824
users