啊哈磊_编程从这里起步

标题: 到底怎么回事·一直说有问题打不开 [打印本页]

作者: theAFKhacker    时间: 2018-6-25 16:37
标题: 到底怎么回事·一直说有问题打不开
#include <stdio.h>
#include <stdlib.h>
int main()
{
        int a,b;
    b=2;
    scanf("%d",&a);
    while(b*b<=a)
    {
                if(a%b==0)
        {
                        printf("no");
            system("pause")
        }
                else b=b+1
    }
    printf ("yes");
    system("pause");
        return 0;


作者: zyx6680599    时间: 2018-6-25 16:37
#include <stdio.h>
#include <stdlib.h>
int main()
{
        int a,b;
    b=2;
    scanf("%d",&a);
    while(b*b<=a)
    {
                if(a%b==0)
        {
                        printf("no");
            system("pause");
        }
                else b=b+1;
    }
    printf ("yes");
    system("pause");
        return 0;
}
作者: 關術    时间: 2018-6-28 15:26
代码注意对齐,否则系统不能编译
作者: 雨文/tp    时间: 2018-7-18 23:28
#include <stdio.h>
#include <stdlib.h>
int main()
{int a,b;

   
    scanf("%d",&a);
     b=2;
    while(b*b<=a)
    {
        if(a%b==0)
        {
             printf("no");
            
        }
        else
    printf ("yes");
     b=b+1;
    }
   

        system("pause");
        return 0;


}

学习中!
作者: theAFKhacker    时间: 2018-7-21 17:20
zyx6680599 发表于 2018-6-25 21:13
#include
#include
int main()

请问有什么区别
充数充数充数充数充数充数充数

作者: theAFKhacker    时间: 2018-7-21 17:20
zyx6680599 发表于 2018-6-25 21:13
#include
#include
int main()

好吧少括号。。。。。。。。。。。。





欢迎光临 啊哈磊_编程从这里起步 (https://bbs.codeaha.com/) Powered by Discuz! X3.2