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

商标购买网站世界互联网峰会视频

商标购买网站,世界互联网峰会视频,微信小程序开发常见问题,应用商店免费下载1.编写一个名为mystrcpy的函数#xff0c;实现将字符串str1的偶数位子的字符的拷贝到另一个字符串str2中。并编写主函数#xff0c;在主函数中从键盘读入一个长度100的字符串str1#xff0c;然后调用函数mystrcpy#xff1b;最后输出str2#xff0c;例如#xff0c;读…1.编写一个名为mystrcpy的函数实现将字符串str1的偶数位子的字符的拷贝到另一个字符串str2中。并编写主函数在主函数中从键盘读入一个长度100的字符串str1然后调用函数mystrcpy最后输出str2例如读入“abcdefgh”,则输出bdfh. #include stdio.hvoid mystrcpy(char *str1,char *str2){int i0,j0;while(str1[i]!\0){if((i1)%20){str2[j]str1[i];j;}i;} }int main(){char str1[]abcdefgh;char str2[100];mystrcpy(str1,str2);printf(%s,str2); } 2.编写一个函数将一维数组转换成一个N阶方阵二维数组矩阵的行数由函数的参数指定。然后再main()中调用该函数并打印输出该仿真的对角线上的值 #include stdio.h #include stdlib.h #include math.hvoid changesqure(int *a,int n,int **arr,int size){int i,j0,k0;for(i0;in;i){arr[j][k]a[i];k;if(k!0k%size0){j;k0;}} }int main(){int a[]{1,2,3,4,5,6,7,8,9};int n sizeof(a)/sizeof(a[0]);int sizesqrt(n);int **arr (int **)malloc(size*sizeof(int *));int i,j;for(i0;isize;i)arr[i](int *)malloc(size*sizeof(int));changesqure(a,n,arr,size);for(i0;isize;i){for(j0;jsize;j)if(ij)printf(%d ,arr[i][j]);printf(\n);} } 3.编写一个函数求2个数的最小公倍数并输出。要求在主函数中从键盘读入2个正的int型整数求他们的最小公倍数并输出 #include stdio.hint gcd(int x,int y) {if(y0)return x;return 1.0*x*y/gcd(y,x%y); }4.某班学生信息包括学号字符串长度不超过8位、姓名没有空格的字符串长度不超过20位和两门课程的成绩。请写出学生结构体并编写函数CreatList创建学生链表 #include stdio.h #include stdlib.htypedef struct student{char num[8];char name[20];int score1;int score2;struct student *next; }student;struct student *CreatList(int n){struct student *head(struct student*)malloc(sizeof(struct student));head-nextNULL;struct student *prehead;int i;for(i0;in;i){struct student *p(struct student*)malloc(sizeof(struct student));scanf(%s %s %d %d,p-num,p-name,p-score1,p-score2);p-nextpre-next;pre-nextp;}return head-next; } 5.将上题的学生链表信息读出并写入文件student.txt #include stdio.h #include stdlib.htypedef struct student{char num[8];char name[20];int score1;int score2;struct student *next; }student;void writelist(struct student *head){FILE *file;if((filefopen(student.txt,w))NULL){printf(open error);exit(0);}struct student *phead;while(p!NULL){fprintf(file,%s %s %d %d,p-num,p-name,p-score1,p-score2);pp-next;}fclose(file); }
http://www.hkea.cn/news/14303331/

相关文章:

  • 温州市建设工程质量监督站网站建设银行的网站特点
  • 辽阳市城市建设档案馆网站网站图片优化大小
  • 威海住房建设部官方网站cn域名著名网站
  • 兴平网站开发百度推广网页版
  • 成品网站w灬源码伊园怎么样可以建设网站
  • 建设工程官方网站仪陇网站建设
  • 免费建购物网站成都网站建设公司优势
  • 网站建设公司排行杭州灰色行业seo大神
  • html网站开发教程东阳网站建设软件开发
  • 在线购物网站 项目图书网站建设策划书
  • 股票推荐怎么做网站wordpress 企业模板 免费
  • 最大的地方门户网站源码福田企业网站优化哪个好
  • 微信怎么做小程序的seo快速排名软件方案
  • 一个服务器可以备案几个网站吗冒充it男给某网站做修复
  • 网站制作技术支持兰州网站建设技能论文
  • 南京公司网站开发建设银行纪念币网站
  • 兰州新晨诚网络科技有限公司谷歌seo济南
  • 百度海外视频网站建设北京云网站建设
  • 如何找有需求做网站的公司苏州网站建设公司排名
  • 网站移动端推广做化妆品等的网站
  • 温州建校网站网址导航大全软件下载
  • 做网站的公司济南赛博科技市场今天郑州最新新闻
  • 专业设计软件百度搜索引擎优化方式
  • 做网站好公司wordpress需求规划书
  • 河南宏业建设管理有限公司网站wordpress启动广告
  • 手机网站制作机构网站关键词优化教程
  • 长沙网站空间北京seo做排名
  • 报告网站开发环境设计网站账号
  • asp.net 网站登陆设计做网站游戏推广赚钱
  • 海南省住房和城乡建设厅网站首页基础网站建设公司