Write a program that get the input of two integers n and m(n < m). Find out all prime numbers between n and m (not include n and m), then display them on the screen.
寫一個程式 輸入兩個整數n和m (n < m),找出所有n到m之間的質數(不包含n和m)。
Example input 1
1 10
Example output 1
2 3 5 7
Example input 2
10 20
Example output 2
11 13 17 19
Hidden content! * ** * ** *** * **** * * **** * * * * * * * *** * * * int main(){int ** * ** * * * * ** * *** * * * *** * * * *** * * * * * n=o; * * ** * * * * *{ *** * * * * ** * * *{** ** * *** }* * ** * ** * else{* * }}* * * * * *** {*** * * * * * *{ * * * * } **** * * * **else{if * * * *{ ** * * * ** ** ** * * *** * * * * * * * * * **}else * * * * * * * * * ** * * }}** * ** 0;}
Hidden content!#include<stdio.h>int main(void){ int a,cpt,n,m,i,b; a=0;b=0;* * ** * * * * * * * * * * * * * do {* * *** *** ** * * * ** * * * * * * **** * **** * * ** * * * * * ****** ** ** *** }while(m<n); for (i=n+1;i<=m-1;i++) {