自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 java_note_13

/** * Created with IntelliJ IDEA. * Description: * User: zhuzhuzhuchao * Date: 2022-01-06 * Time: 14:02 */public class TestDemo { // 作业20211029 // 2 // 报错:局部变量必须初始化 public static void main(String[] args){ String s; .

2022-01-06 23:53:27 263

原创 java_note_12

/** * Created with IntelliJ IDEA. * Description: * User: zhuzhuzhuchao * Date: 2022-01-05 * Time: 17:03 */public class TestDemo { public static void main(String[] args) { MyLinkedList myLinkedList = new MyLinkedList(); MyLinkedL.

2022-01-05 22:15:44 54

原创 java_note_11

/** * Created with IntelliJ IDEA. * Description: * User: zhuzhuzhuchao * Date: 2022-01-04 * Time: 16:46 */public class TestDemo { public static void main(String[] args) { MyLinkedList myLinkedList = new MyLinkedList(); MyLinkedL.

2022-01-04 21:59:37 290

原创 java_note_10

/** * Created with IntelliJ IDEA. * Description: * User: zhuzhuzhuchao * Date: 2022-01-03 * Time: 12:19 */public class TestDemo { // 链表 // 一个一个节点组成 public static void main(String[] args) { MyLinkedList myLinkedList = new MyLinke.

2022-01-03 17:24:31 47

原创 java_note_9

TestDemo.java/*** Created with IntelliJ IDEA.* Description:* User: zhuzhuzhuchao* Date: 2022-01-01* Time: 15:27*/public class TestDemo {// Calculatorpublic static void main(String[] args) {Calculator calculator = new Calculator();...

2022-01-02 17:54:55 262

原创 java_note_8

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;/*** Created with IntelliJ IDEA.* Description:* User: zhuzhuzhuchao* Date: 2021-12-30* Time: 14:49*/public class TestDemo {public static void main(String[] args) {Person person =.

2021-12-31 00:26:25 115

原创 java_note_7

import java.util.Arrays;/*** Created with IntelliJ IDEA.* Description:* User: zhuzhuzhuchao* Date: 2021-12-28* Time: 16:12*/public class TestDemo {// 数组的有序性public static void main(String[] args) {int[] array = {1,2,3,4,5};boolea...

2021-12-28 20:49:13 184

原创 java_note_6

import java.util.Arrays;/*** Created with IntelliJ IDEA.* Description:* User: zhuzhuzhuchao* Date: 2021-12-26* Time: 14:06*/public class TestDemo {// 汉诺塔问题// 2^n - 1public static void main(String[] args) {hanio(1,'A','B','C');...

2021-12-26 19:22:24 227

原创 java_note_5

import java.util.Scanner;/*** Created with IntelliJ IDEA.* Description:* User: zhuzhuzhuchao* Date: 2021-12-25* Time: 15:16*/public class TestDemo {// 水仙花数 0 - 999999public static void main(String[] args) {Scanner scanner = new Sc...

2021-12-25 20:04:21 132

原创 java_note_4

import javax.crypto.spec.PSource;import java.io.IOException;import java.util.Random;import java.util.Scanner;/*** Created with IntelliJ IDEA.* Description:* User: zhuzhuzhuchao* Date: 2021-12-23* Time: 18:04*/public class TestDemo...

2021-12-23 21:14:56 195

原创 java_note_3

import java.util.Scanner;public class TestDemo {public static void main(String[] args) {// 程序逻辑控制// 顺序结构// 程序执行和代码顺序有关System.out.println("1");System.out.println("2");System.out.println("3");System.out.println("4");// 选择结构// if els...

2021-12-09 22:43:28 247

原创 java_note_2

/*** 类名:大驼峰*/public class TestDemo {public static void main(String[] args) {//psvmSystem.out.println("hello");//sout/*** 布尔类型 没有规定布尔类型的大小 1bit or 1byte* flg = 0 不行* flg 只有 true false*/boolean flg = true;System.out.println(fl...

2021-12-08 18:56:05 59

原创 java_note_1

class Test{}/*** 文档注释:类or方法的前面* 有注释时需要加javac -encoding utf-8编译** 编译:javac* 运行:java*/public class HelloWorld {//类public static void func(String[] args) {//方法也是函数,放在类里面for(int i = 0;i < args.length;i++) {System.out.println(args...

2021-12-07 21:58:05 154

原创 note_18

#define _CRT_SECURE_NO_WARNINGS 1#include<string.h>#include<stdio.h>#include<assert.h>模拟strlenint my_strlen(const char* str){assert(str != NULL);const char* end = str;while (*end != '\0'){end++;}return end - ...

2021-12-05 19:39:27 306

原创 note_17

#define _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>#include<string.h>#include<assert.h>***实用调试技巧**什么是bug?**调试是什么?有多重要?*调式是什么?又称除错*调试的基本步骤发现程序错误的存在以隔离,消除等方式对错误进行定位确定错误产生的原因提出纠正错误的解决办法对程序错误予以改正,重新测试*Debug和Re...

2021-12-05 16:55:26 61

原创 note_16

#define _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>***作业讲解统计二进制中1的个数法1int count_numer_of_1(unsigned int m)//加unsigned使用负数{int c = 0;while (m){if (m % 2 == 1){c++;}m /= 2;}return c;}int main(){int n = 15;//n放...

2021-11-21 18:37:48 45

原创 note_15

#define _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>#include<string.h>***指针1.指针是什么内存中最小单元的编号口语中的指针是指针变量,用来存放地址的变量内存单元 - 编号 - 地址 - 指针指针大小32位平台是4个字节,64位平台是8个字节int main(){int a = 10;&a;int* pa = &a;//(int* 指针指向i...

2021-11-17 19:16:15 50

原创 note_14

#define _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>++ -- 操作符int main(){int a = 10;int b = ++a;//前置++,先++,后使用int c = a++;//后置++,先使用,后++printf("a=%d b=%d c = %d\n", a, b, c);//12 11 11return 0;}int main(){int a = 10;int b...

2021-11-16 19:24:13 588

原创 note_13

#define _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>#include<string.h>//***作业讲解//(3,4)逗号表达式int main(){int arr[] = {1,2,(3,4),5};printf("%d", sizeof(arr));//16return 0;}//***数组操作void init(int arr[], int sz){int i = ...

2021-11-14 17:03:08 818

原创 扫雷小游戏

game.h#pragma once#include<stdio.h>#include<stdlib.h>#include<time.h>#define ROW 9#define COL 9#define ROWS 11#define COLS 11#define EASY 10void InitBoard(char arr[ROWS][COLS], int rows, int cols, char re

2021-11-11 20:49:12 39

原创 note_12

#define _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>#include<string.h>////***作业讲解////***字符串逆序////无递归////int my_strlen(char* s)//{// int count = 0;// while (*s != '\0')// {// count++;// s++;// }// return count;/...

2021-11-10 22:30:02 171

原创 三子棋游戏

实现效果:游戏代码:game.h文件#pragma once#include<stdio.h>#include<time.h>#include<stdlib.h>#define ROW 3#define COL 3void Init_board(char board[ROW][COL], int row, int col);//初始化棋盘void Print_board(char boa...

2021-11-09 11:16:25 45

原创 note_11

#define _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>//int main()//{// //int arr[3][4] = { 1,2,3,4,5,6 };// //int arr[3][4] = { (1,2),3,4,5,6 };// //int arr[][] = { 1,2,3,4,5,6,7,8,9,10,11,12 };// //必须指定列,行可以省略// //int arr[][4] = { 1...

2021-11-08 19:40:19 398

原创 note_10

#define _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>//1-100中几个九//个位是9//十位是9int main(){int i = 0;int count = 0;for (i = 1; i <= 100; i++){//判断i的十位和各=个位是不是9//个位if (i % 10 == 9){count++;}//十位if (i / 10 == 9){...

2021-11-05 21:39:55 433

原创 note_9

#define _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>//***写一个函数 每一次调用 num增加1一,不行void add(int n){n++;}int main(){int num = 0;add(num);printf("%d\n", num);add(num);//传址不会加printf("%d\n", num);return 0;}二void add(int*...

2021-11-03 12:59:26 41

原创 note_8

#define _CRT_SECURE_NO_WARNINGS 1#include <stdio.h>//***goto语句//不常用//终结深度嵌套使用int main(){again:printf("hehe\n");printf("haha\n");goto again;//跳转到again//标签在同一个函数内return 0;}//***关机程序//只要程序启动就倒计时60秒关机//60秒内输入 我是猪 就取消...

2021-11-02 15:23:42 51

原创 note_7

#define _CRT_SECURE_NO_WARNINGS 1#include <stdio.h>////***作业讲解//得到每一位数//int main()//{// int n = 0;// scanf("%d", &n);// while (n)// {// printf("%d", n % 10);// n = n / 10;// }// return 0;//}////法二...

2021-11-01 18:20:49 1818

原创 note_6

#define _CRT_SECURE_NO_WARNINGS 1#include <stdio.h>//*** getchar//int main()//{// int ch = getchar();// //从键盘上读取一个字符// //int是ASCII码// //读取失败的时候返回EOF(-1)// //-1需要4个字节,char只有1给字节// //printf("%c", ch);// //printf("%c", 97);//...

2021-10-31 21:35:59 34

原创 note_5

#define _CRT_SECURE_NO_WARNINGS 1#include <stdio.h>//int main()//{// int a = 10;// //printf("%p", &a);// //p是用来存放地址的// //p称为指针变量// int* p = &a;// //*表示p是一个指针变量// // int表示p指向的对象的类型是int// //指针pointer// //printf("%p\n...

2021-10-31 21:34:46 37

原创 note_4

#define _CRT_SECURE_NO_WARNINGS 1#include <stdio.h>//***作业//int main()//{// int a = 40;// int c = 212;//// printf("%d\n", (-8 + 22) * a - 10 + c / 2);// return 0;//}//***作业//int main()//{//// int a = 0;// int b = 0...

2021-10-30 19:28:46 53

原创 note_3

#define _CRT_SECURE_NO_WARNINGS 1//***选择语句//***if语句//#include <stdio.h>//int main()//{// int input = 0;// printf("加入比特\n");// printf("你要好好学习码?(1/0):");// scanf("%d", &input);// //输入操作// if (input == 1)// == 是判断 = 是赋值...

2021-10-29 20:27:02 63

原创 note_2

#define _CRT_SECURE_NO_WARNINGS 1#include <stdio.h>//int b = 100;//全局变量////int main()//{// int a = 10;//局部变量// {// int b = 10;//局部变量// }// return 0;//}//////int c = 1000;//全局变量//int main()//{// //2个整数相加// i...

2021-10-28 22:41:59 70

空空如也

空空如也

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

TA关注的人

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