- 博客(68)
- 收藏
- 关注
原创 C++ 基本知识、数组、指针
#include <iostream>using namespace std;int main(){ cout << "hello world!" << endl; return 0;}————————————————————————————————————知识点一,用sizeof测量数据类型的长度#include <iostream>#include <cmath>#include <iomanip&g...
2020-09-15 11:42:34 254
原创 HTML5新增结构元素 article
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body><article> <header> <h...
2019-06-04 19:18:20 334
原创 内联框架iframe
创建两个html文件,其中一个取名为framea.html在framea.html中<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title></head><body bg...
2019-06-04 16:00:43 136
原创 PHP与表单交互
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>表单与PHP交互</title></head><body> <form action="http://localhost:8081/...
2019-06-02 17:44:04 546
原创 表单、PHP环境搭建
表单<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>表单</title></head><body> <form> <!--定义表单--> 用户名...
2019-06-01 20:19:02 113
原创 列表、块、布局
列表无序中,前面会有小点,以下定义小点是一个什么样的点disc 实体圆circle 空心圆square 实体方块有序中,默认前面会有数字123,以下定义可以盖面前面的数字,ABC或abc或罗马数字或小写罗马数字,start定义数字不从1开始,可以从别的数字开始,比如567,只有start写<ol start="10"> </ol>, ...
2019-06-01 16:22:02 164
原创 样式、链接、表格
1、样式标签<style> 样式定义<link> 资源引用引入方法外部样式表(就是从外部引入,相当于新建一个文件B,然后引入到当前文件A里,从而给A穿上衣服)示例:<link rel="stylesheet"type="text/css"href="mystyle.css"> rel="stylesheet" 外部样式表...
2019-06-01 14:57:13 142
原创 元素、属性、格式化
元素:从开始到结束的所有代码属性<h1>:aling 对齐方式<body>:bgcolor 背景颜色<a>:target 规定在何处打开链接通用属性class: 规定元素的类名id:规定元素唯一IDstyle: 规定元素的样式title: 规定元素的额外信息具体应用<h1 align="center">标题...
2019-05-31 21:09:15 112
原创 声明、基础标签head、body。标题标签 、段落标签、超链接标签、图像标签
真·题目:声明<!DOCTYPE> 、基础标签head、body。标题<h1>...<h6>等标签 、段落标签、超链接标签、图像标签<!--非说我使用非法标签,不改名就不让发布..hehe.jpg-->使用开发工具:WebStorm<!DOCTYPE html> <!--声明,表示这是HTML5版本的网页-->...
2019-05-30 17:37:54 314
原创 96-100
96、计算字符串中子串出现的次数 。#include<stdio.h>#include<stdlib.h>#include<string.h>int main(){ int i,j,k,TLen,PLen,count=0; char T[50],P[10]; printf("请输入两个字符串,以回车隔开,母串在前,子串在后:...
2019-05-29 07:03:46 121
原创 91-95
91、时间函数举例1#include <stdio.h>#include <time.h>int main (){ time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); ...
2019-05-28 07:02:20 361
原创 87-90
87、回答结果(结构体变量传递)。#include<stdio.h> struct student{ int x; char c;} a; int main(){ a.x=3; a.c='a'; f(a); printf("%d,%c",a.x,a.c);}f(struct student b){ b.x...
2019-05-27 09:30:42 224
原创 81-86
81、809*??=800*??+9*?? 其中??代表的两位数, 809*??为四位数,8*??的结果为两位数,9*??的结果为3位数。求??代表的两位数,及809*??后的结果。#include <stdio.h> void output(long int b, long int i){ printf("\n%ld = 800 * %ld + 9 * %ld\n"...
2019-05-26 15:12:00 97
原创 73-80
73、反向输出一个链表。#include<stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct LNode{ int data; struct LNode *next;}LNode,*LinkList; LinkList CreateList(in...
2019-05-25 20:38:39 190
原创 66-72
66、# include<stdio.h> void swap(int *, int *);int main(void){ int a, b, c; int *p1, *p2, *p3; printf("输入 a, b ,c:\n"); scanf("%d %d %d", &a, &b, &c); p1 ...
2019-05-24 08:32:55 211
原创 61-65
61、62、#include <stdio.h> int main(){ int i,j; int a[10][10]; printf("\n"); for(i=0;i<10;i++) { a[i][0]=1; a[i][i]=1; } for(i=2;i<10;i++...
2019-05-23 06:40:51 95
原创 58-60
58、#include "graphics.h"int main(){ int x0,y0,y1,x1,driver,mode,i; driver=VGA;mode=VGAHI; initgraph(&driver,&mode,""); setbkcolor(YELLOW); x0=263;y0=263;y1=275;x1=27...
2019-05-22 07:07:09 118
原创 56-57
56、#include <graphics.h>int main(){ int driver,mode,i; float j=1,k=1; driver=VGA; mode=VGAHI; initgraph(&driver,&mode,""); setbkcolor(YELLOW)...
2019-05-21 06:49:40 110
原创 51-55
51、学习使用按位与 &。#include <stdio.h>int main(){ int a,b; a=077; b=a&3; printf("a & b(decimal) 为 %d \n",b); b&=7; printf("a & b(decimal) 为 %d \n",b); ...
2019-05-20 06:59:04 226
原创 45-50
45、#include <stdio.h>int main(){ register int i; int tmp=0; for(i=1;i<=100;i++) tmp+=i; printf("总和为 %d\n",tmp); return 0;}46、#include<stdio.h>...
2019-05-19 06:54:09 212
原创 41-44
41、#include <stdio.h>void main(){ void fun(); for (int i = 0; i < 3; i++) fun(); return 0;}void fun(){ int i = 0; static int static_i = 0; printf("i=%...
2019-05-18 06:53:16 170
原创 37-40
37、#include <stdio.h>#define n 10void main(){ int i, j, min, temp, a[n]; printf("input ten num:\n"); for (i = 0; i < n; i++) scanf("%d", &a[i]); for (i = 0;...
2019-05-17 19:14:40 112
原创 34-36
34、#include <stdio.h>void hello_word(void){ printf("hello_world!\n");}void three_hellos(void){ int counter; for (counter = 1; counter <= 3; counter++) hello_world...
2019-05-16 07:03:17 101
原创 32、33
32、#pragma warning(disable:4996)#include "conio.h"#include <stdio.h>#include "windows.h"void main(){ int color; for (color = 0; color < 8; color++) { textbackgro...
2019-05-15 19:34:25 134
原创 31
31、#include <stdio.h>void main(){ char letter; printf("input the first letter of someday\n"); while ((letter = getch()) != 'y') { switch (letter) { ...
2019-05-14 12:04:02 75
原创 26-30
26、#include <stdio.h>void main(){ int i; int fact(); for (i = 0; i < 5; i++) { printf("\40:%d!=%d\n", i, fact(i)); }}int fact(j)int j;{ int sum; ...
2019-05-13 08:15:08 90
原创 22-25
22、#include <stdio.h>void main(){ char i, j, k; for (i = 'x'; i <= 'z'; i++) { for (j = 'x'; j <= 'z'; j++) { if(i!=j) for (k ...
2019-05-12 15:37:59 101
原创 19-21
19、#include <stdio.h>void main(){ int i, j, sum; for (i = 2; i <= 1000; i++) { sum = 1; for (j = 2; j <= i / 2; j++) if (i%j == 0) ...
2019-05-11 17:43:16 156
原创 18
18、#include <stdio.h>void main(){ int a, n, count = 1; long int sn = 0, tn = 0; printf("Please input a and n\n"); scanf("%d %d", &a, &n); printf("a=%d,n=%d\n", ...
2019-05-10 20:23:03 148
原创 14-17
14、#include <stdio.h>void main(){ int i, n; printf("input number\n"); scanf("%d", &n); printf("%d=", n); for (i = 2; i <= n; i++) { while (n != i)...
2019-05-09 11:07:03 162
原创 13(水仙花数)
#include <stdio.h>void main(){ int i, j, k, n; printf("水仙花:"); for (n = 100; n < 1000; n++) { i = n / 100; j = n / 10 % 10; k = n % 10; ...
2019-05-08 20:03:46 114
原创 9-12
9、#include <stdio.h>int main(void){ int i, j; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) { if ((i + j) % 2 == 0) { ...
2019-05-07 17:48:54 152
原创 3-8
3、#include <math.h>#include <stdio.h>void main(){ long int i, j, k; for (i = 1; i < 100000; i++) { j = sqrt(i + 100); k = sqrt(i + 268); if (j...
2019-05-07 15:13:41 162
原创 1,2
1、#include <stdio.h>void main(){ int i, j, k; for(i=1;i<5;i++) for(j=1;j<5;j++) for (k = 1; k < 5; k++) { if (i != j &&...
2019-05-06 21:31:10 351
原创 进度日志34 (文件写入,文件读取,位运算符,位运算,位段)
学习笔记1:文件写入#include <stdio.h>#include <stdlib.h>void main(){ FILE *fp; char ch, filename[20]; printf("Please input the filename you want to write: "); scanf("%s", filen...
2019-05-05 15:37:35 156
原创 进度日志33 (用typedef定义类型,文件的打开与关闭)
学习笔记1:用typedef定义类型编程1:用typedef生命新的类型名来代替已有类型名(用INTEGER代替int)#include <stdio.h>typedef int INTEGER; //程序中 INTEGER 相当于 intvoid main(){ INTEGER i = 1; int j = 2; printf("%d,%d...
2019-05-04 20:45:52 202
原创 进度日志32 (对链表结点的删除,对链表结点的插入)
学习笔记1:对链表结点的删除题目:写一函数,删除动态链表中指定的结点思路:#include <stdio.h>#include<malloc.h>#include <stdlib.h> //因为下面用到NULL,所以在此引入#define LEN sizeof(struct student) //student结构的大小struc...
2019-05-03 19:15:11 177
原创 进度日志31 (结构指针变量作函数参数,链表)
学习笔记1:结构指针变量作函数参数题目:有一个结构体变量stu,内涵学生学号、姓名和三门课的成绩。通过调用函数print中将他们输出答案1:用结构体变量的成员作参数#include <stdio.h>#include <string.h> //犹豫下方用到字符串的拷贝,所以要定义在头文件里struct student //定义结构体student{ ...
2019-05-02 17:13:58 151
原创 进度日志30 (条件编译,结构体(变量初始化、数组、指向结构体类型数据的指针))
学习笔记1:条件编译#include <stdio.h>#define CORRECT "Why"void main(){ char str[40]; //定义一个字符串变量来让用户输入字符串 int cmp(char *str1, char *str2); //自己定义一个对比函数,将用户输入的字符串跟标准的COTTECT进行对比 printf("Don...
2019-05-01 20:07:59 397
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人