Toggle navigation
Courses
Questions
Tags
Users
AD 20161013 作業 2
0
like
0
dislike
4.5k
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
|
4.5k
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! * * * * * * * *
* * ***** * *
main()
{
int a, b;
int j, k;
* * * * * *** *** **** * * ** *****
for(j = a;j<=b;j ++)
{
* ** ** ** * ** ** * * * * * * **** *
* * * ** * * * * * == 0)
* *** *** * * * * * * * *** * ** * * * *
*** *** * * * * * * ** * * * *** * ** * ** * j>1)
** * * * * * *** * * * * * * *
}
* *** * * * * ** * ** *
return 0;
}
answered
Oct 13, 2016
by
cityhunter0412
(
-30
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()
{
int y=0,z=0,k=0,t=0;