Toggle navigation
Courses
Questions
Tags
Users
AC 20161013 作業 2
0
like
0
dislike
6.5k
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
|
6.5k
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>
int main(void)
{
****** * * ** *** * a,b,i,j,k;
* ** * ** ***** * *** * ** *** * *
** * ** * ** * *** ***** * * * * *
** * * *** * ** < j;j <= b;j ++)
* * **** * ***
* **** **** * *** * * * *** ** * * = 2;k < j;k++)
** ***** * ***** * ** ***** **** * **** * ******* % k == 0)
* * ** * * * * * * * ** * **** *** ** *** ****
** **** * **** * **** * *** ** ** **** == j)
* ** **** * * *** *** * ** *** ** * * ",j);
** *** *** **
** **** * ** 0;
}
answered
Oct 13, 2016
by
蘇瑋朝
(
-8
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include<stdio.h>
int main()
{
*** * ** **** * ** * * a, b, j, k;
** * ** * *** ****** * *** , &a, &b);
***** * *** ** = a;j <= b;j ++)
{
* * * ** ** **** ** ***** * ** = 2;k < j;k ++)
* ******* ** ** ***** * * ***** * ** ************
* ***** **** *** *** *** ** * * ** ***** * ** ** *** * *** **** % k ==0)
* * * ** * * * ****** * * ** **** * ******* *** ******
* *** ** * * * *** **** ** ***
* * ** * * ** * * * * * * * * ** * == j)
** * * ** * ** * * * ** * ** * * * * * * ** *** * * ** * j);
** ** ** * **
* * *** * ** *** ** 0;
}
answered
Oct 13, 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 * *
{
* * **
* *** ** ******* * * ***
** ** * ***** ** *** * * ****
****** * *
{
** * * ** *
{
* * % d == *** ***
}
* * == d * *** ** * * ** ********* * * ****
}
** 0;
}
answered
Oct 13, 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 * ** ***
int main()
{
***** ** ** * * a,b,j,k;
***** * * *** * ** * * * ** **
****** ******* * * b;j++)
***** * **
* * * * *** ** *** * * (k=2;k< j;k++)
*** ** * ** ** * * * *********** * (j%k==0)
* * ** * *** * * * *** * * * * * * ***
** ****** ** *** (k >= j)
* * * * * *** *** * * * * * * * ** ** * ",j);
****** *
** ** *** ***
}
answered
Oct 13, 2016
by
Noah1011
(
43
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* ** **** * *
*** * * * * * **
int main ()
{
int **
** ** * ** ***** ** * * ****
* * * ** * ****
{
* * * ** *
* ** *
break;
*** * **** *
** ** ** * ** *
}
return 0;
}
answered
Oct 13, 2016
by
Queenie0915
(
-124
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include * ** * ** * **
int main()
{
* * *** * * ** a, b, j, k;
***** **** * * * **** * ** &a, &b);
* * * *** *** ** = a; j <= b; j ++)
*** * ** *
**** * ***** * ** * ** ** * * = 2; k < j; k++)
* ** ** * * * * * * ***** **
* ***** * **** * *** ** ***** ******** ******* * * *** * ** j % k ==0)
** *** * **** ***** *** ** ** * * * * *** * *
* * * * * * ** ** * * * ** *
* ** * * ** ** * ** * * * (k == j)
* ** * **** **** *** * **** **** **** ** ", j);
**** * * ** *****
* ** *** * ***** ** 0;
}
answered
Oct 13, 2016
by
wilson0121
(
-74
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* ** * ** * **
* ***** *** **
int main **
{
** * *
* * ** *** ** * *
*** ** * ** * * * ***
* *** **
{
* ******* *
{
* % d == *****
}
== d *** ****** * * * **** * ****** * **** * * *
}
* 0;
}
answered
Oct 13, 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>
int main()
{
* ** * * ** *** *** * * a,b,j,k;
* * ***** *** **** **** ** *** * *** ** * * * **
** * ***** * * * * * = a;k <= b;j ++)
{
* **** ** * ** *** * ** ********** * * ********* = 2;k < j;k ++)
*** **** **** ** ** **** ** ** ** * * ** *
** * * * * * * * * **** ** ** * ** ***** ** ** **** * ** * * ** * * % k == 0)
** ** * *** * ** ** * ********* ** ** ** * ** * * * *** * ** ** ** * * ** ***** ** ** *** **** **
*** ** * **** * **** **** ** * ** * * * *****
* **** ***** * ** * * * * * ** *** *** == j)
** * ** *** * ***** * * **** * **** * * * * * ** * * * ** * ** ****** *** ** ",k);
}
** * ***** * *** ** *******
******* * * * **** *** * * 0;
}
answered
Oct 13, 2016
by
loyfree0706
(
-216
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
#include * * ****** **
int main()
{
* ** *** * ** a,b,j,k;
* ** *** * * ** *** * * * * ***
* ***** * * *** ** b;j++)
** * ** * *** *
**** **** ** ** *** *** ** * (k=2;k< j;k++)
**** * ** ** *** ** * **** * * ** *** * (j%k==0)
* **** *** ***** * * * * *** ** * * **
* ** ** *** (k >= j)
* ** * **** * * * * *** *** * ** *** ** ",j);
** ***
**** * **** ** *** * ** * 0;
}
answered
Oct 13, 2016
by
Noah1011
(
43
points)
ask related question
comment
Please
log in
or
register
to add a comment.
0
like
0
dislike
Hidden content!
* * * ***
* *** * *** * * *
int main ***
{
*** **
**** * * ** ****
** ** * ***** * ** **
* ** * ** ** *
{
** * ** *
{
* % d == * ** *
}
**** == d * * * *** * * *** * * ** ** * * *
}
** * 0;
}
answered
Oct 13, 2016
by
410523022
(
-276
points)
ask related question
comment
Please
log in
or
register
to add a comment.
Page:
« prev
1
...
4
5
6
7
8
9
10
next »
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English
中文
Tiếng Việt
IP:172.71.254.114
©2016-2025
Related questions
0
like
0
dislike
64
answers
AC 20161013 作業 4
[Exercise]
Coding (C)
-
asked
Oct 13, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 13763 -
Available when:
Unlimited
-
Due to:
Unlimited
|
4.5k
views
0
like
0
dislike
61
answers
AC 20161013 作業 3
[Exercise]
Coding (C)
-
asked
Oct 13, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 13736 -
Available when:
Unlimited
-
Due to:
Unlimited
|
4.8k
views
0
like
0
dislike
117
answers
AC 20161013 作業 1
[Exercise]
Coding (C)
-
asked
Oct 13, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 13581 -
Available when:
Unlimited
-
Due to:
Unlimited
|
7.4k
views
1
like
0
dislike
48
answers
AC 20161102 作業2
[Exercise]
Essay (Open question)
-
asked
Nov 2, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 16865 -
Available when:
Unlimited
-
Due to:
Unlimited
|
4.3k
views
0
like
0
dislike
76
answers
AC 20161019 作業 2
[Exercise]
Coding (C)
-
asked
Oct 19, 2016
in
作業
by
Shun-Po
(
18k
points)
ID: 14120 -
Available when:
Unlimited
-
Due to:
Unlimited
|
5.8k
views
12,783
questions
183,442
answers
172,219
comments
4,824
users