标签:算法
——前三题没理由单独写,放一块吧
————第1题:A+B+C
<strong><span style="font-size:18px;"><span style="color:#ff0000;">#include <stdio.h>
</span></span></strong>int main()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
printf("%d",a+b+c);
}<strong><span style="font-size:18px;"><span style="color:#ff0000;"></span></span></strong>
#include "stdio.h"
int main()
{
int a,b;
scanf("%d%d",&a,&b);
if(a % b == 0)
printf("YES");
else
printf("NO");
}
#include "stdio.h"
int main()
{
int a,i;
scanf("%d",&a);
for(i = 2;i < a;i++)
{
if(a % i == 0)
{
printf("NO");
return 0;
}
else
continue;
}
if(i == a)
printf("YES");
}标签:算法
原文地址:http://blog.csdn.net/cnshsh/article/details/39270607