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