自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 Java字典

scores={"zhangsan": "da","weq":12,"dqd":78} #{}方式定义 键:值print(scores,type(scores),id(scores))student=dict(name="jack",age=20) # 内置函数方式定义 键=值print(student)# 获取值print(scores["zhangsan"]) # 普通方式,在不存在键时会报错print(scores.get ("zhangsan")) #get函数方法,在不存在该键时..

2022-04-12 12:02:34 862

原创 python输出方式

print('单引号') # 自带换行print('hello','world','python') # 不换行输出就写在同一个printprint('''三引号''')print("hello python") # 输出字符串print(520) # 输出数字时可以不加引号print(3 + 1) # 输出表达式 结果为4# 注意事项:指定盘符要确定,使用file=语句。fp = open(r"D:\python设计\text.txt", 'a+') # 文件输出,如果没有该文.

2022-04-06 14:26:43 793

原创 Java输入输出

方法一,scanner输入方式:import java.nutil.*;//引入until包static void scanner(){ Scanner scanner; scanner=new Scanner(System.in); int a=scanner.nextInt(); System.out.println(a); double c=scanner.nextDouble(); ...

2022-04-04 14:26:02 460

原创 for循环

#include<stdio.h>int main(){ int j,i; for(i=1;i<=9;i++)//括号内的三个表达式分别命名为表达式1、2、3 { for(j=1;j<=i;j++) printf("%d\t",i*j); printf("\n"); } //括号内的三个表达式都可以省略。 i=1; for(;i<=9;i++...

2021-11-26 21:15:22 758

原创 C语言引用字符串

#include<stdio.h>int main()//引用字符串的两中方法{//方法一 数组 char a[]="I Love You"; printf("%s\n",a); printf("%c\n",a[7]);//方法二 指针 char * q="I Love You";//等同于指针变量引用一维数组的方法三 printf("%s\n",q);//对于字符串的输出可以使用字符数组名或者字符指针变量名输出。但是对于数值型数组并...

2021-11-06 20:47:44 1851

原创 C语言指针、用指针实现交换变量值

#include<stdio.h>int main(){ int *pointer1,*pointer2,*p;//定义指针变量 * 为指针运算符 int a,b,c; //指针对于普通变量的指向可以更简单的编写 int *K=&c;//同时体现了一个变量可以有多个指针指向。 scanf("%d%d",&a,&b); pointer1=&a; //将变量a的地址赋给pointer1 poin...

2021-11-06 20:44:02 2197

原创 循环链表的创建(用户手动输入)、遍历输出

#include<iostream>#include<stdlib.h>using namespace std;typedef struct cnode{ int data; int order; struct cnode * next;}cirlnode,*cirlist; cirlist rear;// 固定尾指针void initclist(cirlist &head){ head=new cirlnode; ...

2021-11-05 21:40:07 269

原创 数据结构单链表、双向链表的基本操作

#include<stdlib.h>#include<stdio.h>#include <malloc.h>#include<iostream>using namespace std;#define ok 1#define error 0#define null 0typedef struct node//define a structure;{ int data; struct node * next;//pointer...

2021-11-04 19:29:45 193 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除