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>
** * * ** * * * **
main()
{
int a,b,j,i;
* ** * * **** ** **
** * * * * ** *** *
for(j=a;j<=b;j++)
{
* * * * * *** **** *** * * * ** *
** ** ** *** ** * * * **
* * ** * ** * ** * * *** * * * * * **
* ** ** * ** ** * * ** * * * ** *******
* ** * * * *** * * *
if(j==i)
** * * * * * ** * ** * * **
* * ***** * * * **** * **** * * * * * ** ** ** ** ** * ",j);
* * *** * ** ***
}
}
answered
Oct 16, 2016
by
林佳慧
(
-85
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 a=0,b=0,c=0,d=0;
** * ** * * ** ** * * * * ** * * * * * ** * *** ** *
* * ** * * * * * * * ***
{