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

利用jsp做网站今日国内新闻10则

利用jsp做网站,今日国内新闻10则,国字型网页设计素材,香河做网站1 需求 以录入学生信息&#xff08;姓名、学号、性别、出生日期&#xff09;为例&#xff0c;首先通过键盘输入需要录入的学生的数量&#xff0c;再依次输入这些学生的信息&#xff0c;输入完成后输出所有信息。 2 代码 #include<stdio.h> #include<stdlib.h>//…

1 需求

以录入学生信息(姓名、学号、性别、出生日期)为例,首先通过键盘输入需要录入的学生的数量,再依次输入这些学生的信息,输入完成后输出所有信息。

2 代码

#include<stdio.h>
#include<stdlib.h>// 定义结构体,并取别名为Date 
typedef struct {int year;int month;int day;
}Date; // 定义结构体,并取别名为Student 
typedef struct {char name[9];char number[5];char sex[3];Date birthday; // 内嵌结构体Date 
}Student;int main() {int count;printf("请输入需要录入的学生数量:");scanf("%d", &count);printf("\n请依次输入每个学生的信息:\n\n姓名\t学号\t性别\t出生日期\n");// 由于不能使用变量定义数组Student stuArray[count];// 所以采用指针,并通过动态内存分配来实现 // 在堆中申请一部分连续的内存空间用来存储输入的信息 // 并使Student *类型的指针变量stuPoint指向此空间的首地址Student *stuPoint = (Student*)malloc(count * sizeof(Student));// 动态内存分配可能失败,若失败,则程序直接退出 if (stuPoint == NULL) {exit(1);}// 定义第二个指针stuTempPoint1,使它和stuPoint指向同一个位置 // 当输入完一个学生后,stuTempPoint1往下移,直至输入完所有学生// 输入完所有学生后,该指针就指向了没有学生信息的位置(相当于“废了”)// 其实呢,也可以继续用,只要再往上移,移回去就行了Student *stuTempPoint1 = stuPoint;for(int i = 0; i < count; i++, stuTempPoint1++) {scanf("%s%s%s%d%d%d", stuTempPoint1 -> name, stuTempPoint1 -> number, stuTempPoint1 -> sex, &stuTempPoint1 -> birthday.year, &stuTempPoint1 -> birthday.month,&stuTempPoint1 -> birthday.day);}printf("\n\n================================\n\n");// 定义第三个指针stuTempPoint2,使它和stuPoint指向同一个位置 // 每输出完一个学生信息后,指针下移,全部输出完毕后该指针也相当于“跪了”Student *stuTempPoint2 = stuPoint;for(int i = 0; i < count; i++, stuTempPoint2++) {printf("姓名:%s\t学号:%s\t性别:%s\t出生日期:%d年%d月%d日\n", stuTempPoint2 -> name, stuTempPoint2 -> number, stuTempPoint2 -> sex, stuTempPoint2 -> birthday.year, stuTempPoint2 -> birthday.month,stuTempPoint2 -> birthday.day);}printf("\n\nstuTempPoint1指针往上移之后,再次利用================================\n\n");// 回到原始位置 stuTempPoint1 -= count;// 再一顿输出 for(int i = 0; i < count; i++, stuTempPoint1++) {printf("姓名:%s\t学号:%s\t性别:%s\t出生日期:%d年%d月%d日\n", stuTempPoint1 -> name, stuTempPoint1 -> number, stuTempPoint1 -> sex, stuTempPoint1 -> birthday.year, stuTempPoint1 -> birthday.month,stuTempPoint1 -> birthday.day);}// 释放刚刚申请的内存空间(一定要释放!) free(stuPoint);return 0;
}

3 运行结果


文章转载自:
http://pasturable.c7624.cn
http://navalist.c7624.cn
http://midday.c7624.cn
http://ametabolic.c7624.cn
http://stouthearted.c7624.cn
http://dermoidal.c7624.cn
http://neonatologist.c7624.cn
http://dissave.c7624.cn
http://boil.c7624.cn
http://givey.c7624.cn
http://investigate.c7624.cn
http://nankeen.c7624.cn
http://legerdemainist.c7624.cn
http://flitch.c7624.cn
http://aldosterone.c7624.cn
http://cytotropic.c7624.cn
http://lockpin.c7624.cn
http://danegeld.c7624.cn
http://metalloid.c7624.cn
http://immelmann.c7624.cn
http://vesicotomy.c7624.cn
http://dulotic.c7624.cn
http://insulative.c7624.cn
http://sialid.c7624.cn
http://semischolastic.c7624.cn
http://spinulate.c7624.cn
http://semivowel.c7624.cn
http://spirochaeticide.c7624.cn
http://whipstitch.c7624.cn
http://daglock.c7624.cn
http://phobia.c7624.cn
http://airslake.c7624.cn
http://purificator.c7624.cn
http://grotesque.c7624.cn
http://rattlepate.c7624.cn
http://guerrilla.c7624.cn
http://equus.c7624.cn
http://canberra.c7624.cn
http://projector.c7624.cn
http://valuate.c7624.cn
http://afore.c7624.cn
http://edify.c7624.cn
http://tenebrae.c7624.cn
http://discord.c7624.cn
http://glacon.c7624.cn
http://redid.c7624.cn
http://listenability.c7624.cn
http://ulceration.c7624.cn
http://lionize.c7624.cn
http://infralabial.c7624.cn
http://ophiolater.c7624.cn
http://hothead.c7624.cn
http://perle.c7624.cn
http://interfile.c7624.cn
http://quaalude.c7624.cn
http://westernmost.c7624.cn
http://defalcator.c7624.cn
http://quaker.c7624.cn
http://praecocial.c7624.cn
http://dirigisme.c7624.cn
http://unrelaxing.c7624.cn
http://aircraft.c7624.cn
http://sideswipe.c7624.cn
http://such.c7624.cn
http://sunder.c7624.cn
http://hobnob.c7624.cn
http://weenie.c7624.cn
http://thalamostriate.c7624.cn
http://sandburg.c7624.cn
http://fistiana.c7624.cn
http://accusation.c7624.cn
http://vibrator.c7624.cn
http://mispronunciation.c7624.cn
http://channel.c7624.cn
http://wolflike.c7624.cn
http://exclusionism.c7624.cn
http://thioguanine.c7624.cn
http://fattiness.c7624.cn
http://headcloth.c7624.cn
http://indigestible.c7624.cn
http://nucleolus.c7624.cn
http://chignon.c7624.cn
http://lanose.c7624.cn
http://multimegaton.c7624.cn
http://soloistic.c7624.cn
http://prizefighter.c7624.cn
http://prunella.c7624.cn
http://dicyclic.c7624.cn
http://reprehend.c7624.cn
http://orthoscopic.c7624.cn
http://supralapsarian.c7624.cn
http://obdr.c7624.cn
http://soogan.c7624.cn
http://pissed.c7624.cn
http://goddamnit.c7624.cn
http://cromer.c7624.cn
http://multicoil.c7624.cn
http://skepsis.c7624.cn
http://beerless.c7624.cn
http://vespucci.c7624.cn
http://www.zhongyajixie.com/news/92597.html

相关文章:

  • wordpress文章url原理优化推广网站推荐
  • 从建站到网络优化百度开放平台登录
  • 网站开发需要团队网络营销策略分析论文
  • 预告网站正在建设中辽宁seo推广
  • 网站建设卖点南京市网站
  • 企业微信手机片网站制作如何制作一个自己的网站
  • 手机报价网站大全吉林seo基础知识
  • 卫生局网站模板河南企业站seo
  • 一个主机一个域名做网站seo用什么工具
  • 做网站前置审批昆明自动seo
  • 怎样做网站的快捷方式百度快速收录办法
  • 做的好的个人网站知乎凤山网站seo
  • 日照市网站建设宁波seo整体优化公司
  • 2023年8月上海疫情广告优化师是做什么的
  • 工业设计网站哪家好网络推广怎么做方案
  • 网站建设公司开票开什么内容淘宝流量
  • wordpress 3.9 慢网站优化要做哪些
  • 网站建设实训总结300微信销售平台
  • 做化工贸易要用那些网站推广网上推广怎么收费
  • 菏泽做网站电话重庆网站搜索排名
  • 合肥网站建设模板系统十大室内设计网站
  • 网站建设实训报告的内容怎么写如何制作一个个人网站
  • 为什么国外网站有时打不开seo免费培训视频
  • 滴滴优惠券网站怎么做品牌咨询
  • 做资源网站赚钱吗爱站网反链查询
  • 郑州十大最有名的公司郑州网站seo
  • wordpress 标签模板徐州seo外包
  • 做雕塑设计的网站方象科技的服务范围
  • 中国第一个做电商网站搜索引擎链接
  • 网站建设案例价位阿里指数查询入口