Mining function c code implementation
Publish: 2021-05-03 19:33:25
1. ...
2.
#include<stdio.h>
intcmp(constvoid*a,constvoid*b){
return*(float*)a-*(float*)b>1e-6;
}
intmain(intargc,char*argv[])
{
intn;
while(scanf("%d",&n)!=EOF&&n){
inti;
floatx[n];
floaty[n];
for(i=0;i<n;i++)scanf("%f%f",x+i,y+i);
qsort(x,n,sizeof(float),cmp);
qsort(y,n,sizeof(float),cmp);
printf("%.2f%.2f ",x[(n-1)/2],y[(n-1)/2]);
}
}
3.
代码如下:调试无误:
#include"stdio.h"
#include"math.h"
#include"stdlib.h"
#include"string.h"
#definePI 3.1415926
intmain(){
intn,i;
double*x;
double*y;
scanf("%d",&n);
x=(double*)malloc(sizeof(double)*n);
y=(double*)malloc(sizeof(double)*n);
memset(y,0,sizeof(double)*n);
memset(x,0,sizeof(double)*n);
for(i=0;i<n;i++)
scanf("%lf",&x[i]);
for(i=0;i<n;i++)
y[i]=(PI*(x[i]/2)*(x[i]/2)/4-(x[i]/2)*(x[i]/2)/2)*8;
for(i=0;i<n;i++)
printf("案例%d:%.2lf ",i+1,y[i]);
free(x);
free(y);
}
结果:
4.
It's written in Notepad. It's not verified. It's not a big problem:
5.
#include< stdio.h>< br />
intmain()
{
inti=1;< br /> printf(" 测评[UNK] br /> printf(" 1输[UNK][UNK]员[UNK]绩 ");< br /> printf(" 2[UNK]员[UNK]绩修[UNK] ");< br /> printf(" 3[UNK]员[UNK]绩统[UNK] ");< br /> printf(" 4退[UNK] ");< br /> while(i)
{
scanf("% d"," amp; (i);< br /> if(i==1)
{
printf(" 36755;[UNK][UNK]绩 n");< br /> }
elseif(i==2)
{
printf(" [UNK]员[UNK]绩修[UNK] ");< br /> }
elseif(i==3)
{
printf(" 学员成绩统计 ");< br /> }
elseif(i==4)
{
return0;< br /> }
else
{
printf(" 输[UNK]错误[UNK] 请输[UNK]1-4数[UNK]键 ");< br /> }
}
return0;< br />}
6. You record the sum from the first to the K
and then double-layer for loop to see if that segment can be divided by M
and then double-layer for loop to see if that segment can be divided by M
7.
#include < stdio.h > < br/>intatoi(constchar*s);< br />intmain(void)
{
> 09;printf("% d/n ", atoi (" 1234 ");) < < br/>}
intatoi(constchar*s)
{
> 9n;intsign=1,n;
br/>> 9if(*s='+# 39; s= & #39; & # 39;)
> 9;{< br/>> 09; ˚9if(*s=' 39;)
> 09; {
> 09; <9;; sign=-1;< {0} for(n=0;* s >= 39; 0 ' & amp;& amp;* s < = 39; 9 ' ++ s)
> 9;{< br /> > 9;× 9n=n*10+*s-' 0 ' < {0}
8. According to the criteria of merging, intersection, difference, symmetry difference and equality, it is realized by for loop and if
9. Many friends asked me:
how to set up a sub account
how is it authorized
How can I create it and still not have it in the shop
I have been in touch with Taobao for more than two years. My friends have just entered Taobao, and they often ask questions about sub accounts. Now the main business is scarves, sometimes busy, also often use sub account, so the sub account is still more understanding. Sub account setting may be cumbersome for novices. Sometimes it's not clear. When everyone comes to me, I have to say it again. I think it's troublesome, so I wrote this post. I hope you can operate it yourself after reading this post carefully. If you don't understand it, you can ask me again
you may have just opened a shop, or you just don't understand this piece. It doesn't matter. If you read the following explanation carefully, you will feel: Wow, so easy. Mom doesn't have to worry about my sub account any more...
no more nonsense, let's get to the point......
let's explain the sub account in detail from three aspects:
one. Sub account creation
2. Sub account authorization
three. Sub account diversion setting
four. The sub account number is added to the store
one. Sub account creation
first, you can enter the "seller center" - "store management" - "sub account management" to enter the sub account setting page
after clicking, you will see the following interface, which is the home page of the sub account
note: the credit standing of the seller's shop determines the number of free sub accounts. To view the free number of your shop, click here
if you don't have a sub account, you need to create a new employee, that is, a new sub account
then go to the creation page, and you can follow the prompts step by step. Finally, click "confirm creation" in the upper right corner
then it will be displayed in "employee management", so that the sub account will be created
two. Sub account authorization
you may ask, I create a sub account to allow him to manage my shop, some I just want him to decorate the shop, some I just want him to release the baby, how to set these
next, we need to authorize this sub account. Authorization means that he can only exercise whatever rights you give him
let's look at role permissions first. It's like a title. What kind of rights do you have. For example: the company's finance, he can only deal with this financial problem
next, let's set the permissions of a single sub account. Click this sub account to enter the authorization interface
after completion, click "confirm creation" in the upper right corner
if you want to change a department, check this sub account, and then put the mouse on "change department to", there will be a drop-down box to select the Department you want to change
three. Sub account streaming settings
sometimes, Wangwang is online, but there are buyers in the main account, but there are no buyers in the sub account. Next, let's set the diversion of sub accounts. Click "Wangwang diversion", and then set diversion or no diversion (see the figure below). The specific diversion rules can be viewed here. You have many sub accounts. If you want to operate them in batch, of course you have to check them first
next, we have to take the most critical step, which is also the reason why many friends have said that they have created sub accounts and why they do not display them in the store<
important:
after the group is created, you need to add the sub account to the group. If you don't add it, your sub account is online, and it is gray in the group displayed in the store
after clicking OK, click "synchronize to store"
four. Add a sub account to the store
when you enter the decoration, add a "customer service center" mole in the left column. At this time, you will surely find that there is no group I just added? Don't worry, just click Edit, check and save
note: only Wangwang suspension setting can synchronize Wangwang's head image at the top of the store, so the one that has just been set and checked in the customer service center will not synchronize Wangwang and suspended Wangwang at the top of the store. See the figure below
some friends may not like the customer service center of the system. You can also create a custom mole and edit it yourself. Of course, if you buy a template, some templates may be edited in different ways. If not, you should consult the designer of your template
first, we need to get Wangwang's code. Open Taobao home page, there is a "Ali Wangwang" on the left. After entering, select "seller user portal", click "help" in the upper right corner, and then click "wangbiantianxia" in the lower right corner (see the figure below)
after clicking, the code generation window will pop up. Note: if a sub account code is generated, the colon in the middle of the sub account must be in English. The suggestion is to it directly from the sub account management, so that there will be no mistakes
then click generate code
we the code (some browsers can't click the code button, it doesn't matter, just it directly in the box, use the shortcut key Ctrl + C to Ctrl + V paste), and then paste it into the custom mole (as for how to create the custom mole, I won't stop talking, this is the basis of decoration Foundation) (see the figure below)
when we get to this point, we are basically finished. Click "publish" in the upper right corner to see your results
I spent more than three hours writing this tutorial today, hoping to help my friends
what I write is just for some novices or friends who don't know how to operate. I hope the old birds don't make bricks. If there is something wrong with it, please reply and criticize it more. I will improve it more in the future. I hope I can give you some high-quality tutorials and experience in the future
if you think my writing is good, cheer for me...
maybe there are still some details that haven't been written. I hope you can reply to this post and tell me, and I will add them in time.
how to set up a sub account
how is it authorized
How can I create it and still not have it in the shop
I have been in touch with Taobao for more than two years. My friends have just entered Taobao, and they often ask questions about sub accounts. Now the main business is scarves, sometimes busy, also often use sub account, so the sub account is still more understanding. Sub account setting may be cumbersome for novices. Sometimes it's not clear. When everyone comes to me, I have to say it again. I think it's troublesome, so I wrote this post. I hope you can operate it yourself after reading this post carefully. If you don't understand it, you can ask me again
you may have just opened a shop, or you just don't understand this piece. It doesn't matter. If you read the following explanation carefully, you will feel: Wow, so easy. Mom doesn't have to worry about my sub account any more...
no more nonsense, let's get to the point......
let's explain the sub account in detail from three aspects:
one. Sub account creation
2. Sub account authorization
three. Sub account diversion setting
four. The sub account number is added to the store
one. Sub account creation
first, you can enter the "seller center" - "store management" - "sub account management" to enter the sub account setting page
after clicking, you will see the following interface, which is the home page of the sub account
note: the credit standing of the seller's shop determines the number of free sub accounts. To view the free number of your shop, click here
if you don't have a sub account, you need to create a new employee, that is, a new sub account
then go to the creation page, and you can follow the prompts step by step. Finally, click "confirm creation" in the upper right corner
then it will be displayed in "employee management", so that the sub account will be created
two. Sub account authorization
you may ask, I create a sub account to allow him to manage my shop, some I just want him to decorate the shop, some I just want him to release the baby, how to set these
next, we need to authorize this sub account. Authorization means that he can only exercise whatever rights you give him
let's look at role permissions first. It's like a title. What kind of rights do you have. For example: the company's finance, he can only deal with this financial problem
next, let's set the permissions of a single sub account. Click this sub account to enter the authorization interface
after completion, click "confirm creation" in the upper right corner
if you want to change a department, check this sub account, and then put the mouse on "change department to", there will be a drop-down box to select the Department you want to change
three. Sub account streaming settings
sometimes, Wangwang is online, but there are buyers in the main account, but there are no buyers in the sub account. Next, let's set the diversion of sub accounts. Click "Wangwang diversion", and then set diversion or no diversion (see the figure below). The specific diversion rules can be viewed here. You have many sub accounts. If you want to operate them in batch, of course you have to check them first
next, we have to take the most critical step, which is also the reason why many friends have said that they have created sub accounts and why they do not display them in the store<
important:
after the group is created, you need to add the sub account to the group. If you don't add it, your sub account is online, and it is gray in the group displayed in the store
after clicking OK, click "synchronize to store"
four. Add a sub account to the store
when you enter the decoration, add a "customer service center" mole in the left column. At this time, you will surely find that there is no group I just added? Don't worry, just click Edit, check and save
note: only Wangwang suspension setting can synchronize Wangwang's head image at the top of the store, so the one that has just been set and checked in the customer service center will not synchronize Wangwang and suspended Wangwang at the top of the store. See the figure below
some friends may not like the customer service center of the system. You can also create a custom mole and edit it yourself. Of course, if you buy a template, some templates may be edited in different ways. If not, you should consult the designer of your template
first, we need to get Wangwang's code. Open Taobao home page, there is a "Ali Wangwang" on the left. After entering, select "seller user portal", click "help" in the upper right corner, and then click "wangbiantianxia" in the lower right corner (see the figure below)
after clicking, the code generation window will pop up. Note: if a sub account code is generated, the colon in the middle of the sub account must be in English. The suggestion is to it directly from the sub account management, so that there will be no mistakes
then click generate code
we the code (some browsers can't click the code button, it doesn't matter, just it directly in the box, use the shortcut key Ctrl + C to Ctrl + V paste), and then paste it into the custom mole (as for how to create the custom mole, I won't stop talking, this is the basis of decoration Foundation) (see the figure below)
when we get to this point, we are basically finished. Click "publish" in the upper right corner to see your results
I spent more than three hours writing this tutorial today, hoping to help my friends
what I write is just for some novices or friends who don't know how to operate. I hope the old birds don't make bricks. If there is something wrong with it, please reply and criticize it more. I will improve it more in the future. I hope I can give you some high-quality tutorials and experience in the future
if you think my writing is good, cheer for me...
maybe there are still some details that haven't been written. I hope you can reply to this post and tell me, and I will add them in time.
Hot content