Today learned a block of code to make the color change method, good fun, must be recorded.
Beginning with the code is written blog screenshots, screenshots, then screenshots (stupid to cry)
like this
for some time, actually surprised to find that you can use code blocks (shortcut Ctrl + Shift + K) copy (Ctrl + C) and paste (Ctrl + V) can insert code similar to this
but black and white is very monotonous, the beauty of the fairies of course does not allow the code so monotonous, and I want to give her draw Mimi da makeup how to paint it today, teach a trick instant dermabrasion bigeye, confident out, ha
method is very simple, that is, after insertion of the three points plus code block Java (lowercase) like, as shown in FIG effect, beauty fairy quickly try.
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int isprime(int n)
{
int i = 0;
for (i = 2; i <= sqrt(n); i++)
{
if (n % i == 0)
{
return 0;
}
return 1;
}
}
int main()
{
int i = 0;
for (i = 2; i <=100; i++)
{
if (isprime(i))
printf("%d ", i);
}
system("pause");
return 0;
}