Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

作业 #15

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

作业 #15

wants to merge 26 commits into from

Conversation

Hepper123
Copy link

No description provided.

Copy link
Owner

@luckymark luckymark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

厉害啊,加油

}
while (i >= 0)
{
for (int j = 0; j < i; ++j)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

重复的味道,试着消除吧

int n = 0;
scanf_s("%d", &n);
int Isprime = 1;
for (int j = 2; j <= n / 2; j++)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提成一个函数更舒服一点

{
printf("%d������", n);
}
if (Isprime == 0)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以改为 else

}
else
{
if (Isprime == 1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改为 if (IsPrime) 更像老手一点

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants