求a 到b之间的素数之和,C语言,我想知道我哪里错了.#include#includemain(){unsigned a,b,k;int i ,n ,s=0,flag;printf("Input a and b :\n");do scanf("%d%d",&a,&b);while(a>0&&b>0);if (a>b){k=a;a=b;b=k;}for (n=a;n
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 03:47:56
求a 到b之间的素数之和,C语言,我想知道我哪里错了.#include#includemain(){unsigned a,b,k;int i ,n ,s=0,flag;printf("Input a and b :\n");do scanf("%d%d",&a,&b);while(a>0&&b>0);if (a>b){k=a;a=b;b=k;}for (n=a;n
求a 到b之间的素数之和,C语言,我想知道我哪里错了.
#include
#include
main()
{
unsigned a,b,k;
int i ,n ,s=0,flag;
printf("Input a and b :\n");
do scanf("%d%d",&a,&b);
while(a>0&&b>0);
if (a>b)
{
k=a;
a=b;
b=k;
}
for (n=a;n
求a 到b之间的素数之和,C语言,我想知道我哪里错了.#include#includemain(){unsigned a,b,k;int i ,n ,s=0,flag;printf("Input a and b :\n");do scanf("%d%d",&a,&b);while(a>0&&b>0);if (a>b){k=a;a=b;b=k;}for (n=a;n
#include
#include
main()
{
unsigned a,b,k;
int i ,n ,s=0,flag;
printf("Input a and b :\n");
scanf("%d %d",&a,&b);
if(a>0&&b>0) //这里改了
if(a>b)
{
k=a;
a=b;
b=k;
}
for (n=a;n