Toggle navigation
Courses
Questions
Tags
Users
AD 20161013 作業 2
0
like
0
dislike
2.7k
views
請設計一個程式,讓使用者輸入兩個正整數a以及b(a <= b),從小到大輸出a到b之間的所有質數。
範例輸入:
1 10
範例輸出:
2 3 5 7
[Exercise]
Coding (C)
-
asked
Oct 13, 2016
in
2016-1 程式設計(一)AD
by
Shun-Po
(
18k
points)
ID: 13428 -
Available when:
Unlimited
-
Due to:
Unlimited
|
2.7k
views
comment
0
0
Called for Help
0
0
Called for Help
Please
log in
or
register
to add a comment.
60
Answers
0
like
0
dislike
Hidden content!#include * * * * *
#include * * * * * * *** *
int main()
{
* * * * * * * * * ** ** **** ** numA, numB, num, test, testNum;
* * *** ** * ** * * ** *** * ** ** %d", &numA, &numB);
** * ** * * * * * * ** ** * * (num = numA; num <= numB; num++)
* *** * ** * **** *
** ** * * * ** * * * *** * ** ** * ** **** *** * * * (testNum = 2; testNum < num; testNum++)