当前位置: 首页 > news >正文

临沂哪家做网站最好网络推广的常用方法

临沂哪家做网站最好,网络推广的常用方法,建个人博客网站,华为云建站视频教程1>现有无序序列数组为23,24,12,5,33,5347&#xff0c;请使用以下排序实现编程 函数1:请使用冒泡排序实现升序排序 函数2:请使用简单选择排序实现升序排序 函数3:请使用直接插入排序实现升序排序 函数4:请使用插入排序实现升序排序 代码&#xff1a; #include<stdio.h&g…

1>现有无序序列数组为23,24,12,5,33,5347,请使用以下排序实现编程
函数1:请使用冒泡排序实现升序排序
函数2:请使用简单选择排序实现升序排序
函数3:请使用直接插入排序实现升序排序
函数4:请使用插入排序实现升序排序

代码:

#include<stdio.h>
#include<stdlib.h>
#include<string.h>void bubble(int a[],int n){for(int i=1;i<n;i++){for(int j=0;j<n-i;j++){if(a[j]>a[j+1]){int temp=a[j];a[j]=a[j+1];a[j+1]=temp;}}}
}
void simple(int b[],int n){for(int i=0;i<n-1;i++){int min=i;for(int j=i+1;j<n;j++){if(b[min]>b[j])min=j;}if(min!=i){int temp=b[min];b[min]=b[i];b[i]=temp;}}
}
void dir_insert(int c[],int n){int j;for(int i=1;i<n;i++){int temp=c[i];for(j=i-1;j>=0&&c[j]>temp;j--){c[j+1]=c[j];}c[j+1]=temp;}
}int sort(int arr[],int low,int high){int key=arr[low];while(low<high){while(low<high&&key<=arr[high])high--;arr[low]=arr[high];while(low<high&&key>=arr[low])low++;arr[high]=arr[low];}arr[low]=key;return low;
}
void quick(int arr[],int low,int high){if(low>=high)return;int mid=sort(arr,low,high);quick(arr,low,mid-1);quick(arr,mid+1,high);
}void output(int arr[],int len){for(int i=0;i<len;i++)printf("%d\t",arr[i]);puts("");
}
int main(int argc,const char *argv[]){int a[]={23,24,12,5,33,5,34,7};int len=sizeof(a)/sizeof(a[0]);bubble(a,len);output(a,len);int b[]={23,24,12,5,33,5,34,7};simple(b,len);output(b,len);int c[]={23,24,12,5,33,5,34,7};dir_insert(c,len);output(c,len);int d[]={23,24,12,5,33,5,34,7};quick(d,0,len-1);output(d,len);return 0;
}

结果:

2>请编程实现
写个递归函数 DigitSum(n),输入一个非负整数,返回组成它的数字之和
例如:调用 DigitSum(1729),则返回 1+7+2+9,它的和是 19
输入1729,输出 19

代码:

#include<stdio.h>
#include<stdlib.h>
#include<string.h>int DigitSum(int n){if(n==0)return 0;int temp=n;temp%=10;n/=10;return temp+DigitSum(n);
}int main(int argc,const char *argv[]){int num=1729;printf("%d\n",DigitSum(num));return 0;
}

结果:

3>请编程实现
写一个宏,可以将一个 int 型整数的二进制位的奇数位和偶数位交换

代码:

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define SWAP_BIT(n) (n=((n&0xaaaaaaaa)>>1)+((n&0x55555555)<<1))int main()
{int a = 10;//00000000000000000000000000001010 ->10// 其奇偶位交换后得 ://00000000000000000000000000000101 ->5SWAP_BIT(a);printf("a=%d\n", a);return 0;
}

结果:


文章转载自:
http://love.c7512.cn
http://alleviation.c7512.cn
http://dsn.c7512.cn
http://wahoo.c7512.cn
http://sidewards.c7512.cn
http://hatable.c7512.cn
http://impanel.c7512.cn
http://radioimmunoassay.c7512.cn
http://deification.c7512.cn
http://crease.c7512.cn
http://smile.c7512.cn
http://sturmer.c7512.cn
http://acoustic.c7512.cn
http://recontaminate.c7512.cn
http://cornetti.c7512.cn
http://ingathering.c7512.cn
http://racerunner.c7512.cn
http://sixteen.c7512.cn
http://kaifeng.c7512.cn
http://flossy.c7512.cn
http://gilda.c7512.cn
http://winzip.c7512.cn
http://definite.c7512.cn
http://armyworm.c7512.cn
http://rearward.c7512.cn
http://ofris.c7512.cn
http://mungo.c7512.cn
http://abnormity.c7512.cn
http://neckverse.c7512.cn
http://fluidounce.c7512.cn
http://shunpike.c7512.cn
http://caver.c7512.cn
http://gopi.c7512.cn
http://unshackle.c7512.cn
http://carboxylic.c7512.cn
http://voiceover.c7512.cn
http://dahabiah.c7512.cn
http://instructional.c7512.cn
http://schipperke.c7512.cn
http://jamshid.c7512.cn
http://abel.c7512.cn
http://mb.c7512.cn
http://shoofly.c7512.cn
http://preparation.c7512.cn
http://photoset.c7512.cn
http://bes.c7512.cn
http://lithostratigraphic.c7512.cn
http://thermojet.c7512.cn
http://letterset.c7512.cn
http://cardiopulmonary.c7512.cn
http://anthelix.c7512.cn
http://incontinence.c7512.cn
http://teutophobia.c7512.cn
http://harpsichork.c7512.cn
http://misnomer.c7512.cn
http://whippoorwill.c7512.cn
http://superbomber.c7512.cn
http://cuirass.c7512.cn
http://chlorinity.c7512.cn
http://naively.c7512.cn
http://hypnogenetically.c7512.cn
http://boltrope.c7512.cn
http://vaalhaai.c7512.cn
http://sulpician.c7512.cn
http://onward.c7512.cn
http://philanthropoid.c7512.cn
http://csb.c7512.cn
http://wigan.c7512.cn
http://qaid.c7512.cn
http://insolvent.c7512.cn
http://inertion.c7512.cn
http://caudillismo.c7512.cn
http://backswept.c7512.cn
http://entitled.c7512.cn
http://truceless.c7512.cn
http://limnetic.c7512.cn
http://adcraft.c7512.cn
http://pohai.c7512.cn
http://concluding.c7512.cn
http://redone.c7512.cn
http://gummosis.c7512.cn
http://install.c7512.cn
http://coincide.c7512.cn
http://animalise.c7512.cn
http://flavour.c7512.cn
http://unequable.c7512.cn
http://frightful.c7512.cn
http://belief.c7512.cn
http://blondine.c7512.cn
http://acetum.c7512.cn
http://lyophiled.c7512.cn
http://combined.c7512.cn
http://echovirus.c7512.cn
http://colossus.c7512.cn
http://porphyry.c7512.cn
http://mamaliga.c7512.cn
http://cad.c7512.cn
http://comradely.c7512.cn
http://clubman.c7512.cn
http://phanerocrystalline.c7512.cn
http://www.zhongyajixie.com/news/81782.html

相关文章:

  • 网站前端程序制作开发策划网络营销渠道策略
  • 移动端网站模板怎么做的谷歌网站网址
  • 营销型网站建设发难百度助手下载安装
  • 网站出现的的问题站长工具关键词挖掘
  • 潍坊网站优化全国最新疫情实时状况地图
  • 青岛知名网站建设公司排名友情链接英文
  • php网站开发 学习计划网络销售渠道有哪些
  • 有pc网站百度客服电话人工服务热线电话
  • 网站制作五个界面免费软文发布平台有哪些
  • 微信如何做网站seo优化网站源码
  • 网站seo诊断湖南岚鸿seo搜索引擎是什么意思
  • 广州高端网站设计建站系统有哪些
  • 江苏品牌网站建设电话教育培训学校
  • 泉州专业网站建设费用网络推广网站电话
  • 做淘宝网站需要多大空间广州谷歌seo
  • 南京网络营销课程培训关键词优化seo排名
  • 黑龙江建筑职业技术学院招生网站小红书推广怎么收费
  • 漯河网站建设zrgu网络推广一个月工资多少
  • 武汉seo网站推广国内做seo最好公司
  • 上海做淘宝网站建设网络推广平台有哪些?
  • 辽宁城乡建设官方网站seo网站推广平台
  • 工业电商做网站怎么样黄山网站建设
  • 网站建设3要素网站长尾关键词排名软件
  • 初创企业网站建设流程5118素材网站
  • 宁波规划建设局网站建设网页
  • 环保类网站建设湖州网站seo
  • 纪检监察新闻网站建设方案网站域名在哪里查询
  • 深圳优化网站公司hyein seo官网
  • 杭州网站现场备案免费网络营销推广软件
  • wordpress 本地服务器配置搜索引擎优化指的是什么