- 博客(8)
- 收藏
- 关注
原创 第3章 Java的基本程序设计结构
数据类型 在Java中,整型的范围和运行Java的无关,因此移植性强 八种基本数据类型 整形 byte(1字节) short(2字节) int(4字节) long(8字节) 浮点数 浮点数值不适用于无法接受舍入误差的金融计算,因为浮点数值使用二进制系统表示,而二进制无法精确表示1/10 float(4字节) double(8字节) char boolean 与C++不同,java的整型值和布尔值之间不能相互替代,真就是真,假就是假 字符串 字串 substring() 拼接 一个字符
2021-12-27 19:35:45
201
原创 多线程复习
/* 一个逐字显示句子的程序 */ package com.main; import java.util.Scanner; public class Text { public static Scanner sout = new Scanner(System.in); public static void main(String[] args) { MyT...
2019-03-26 21:41:54
184
原创 异常的捕获与处理(复习)
package com.main; import java.util.Scanner; class MyException extends Exception { public MyException(String s) { super(s); } } class Math { float div(float a, float b) throws My...
2019-03-26 14:39:13
185
原创 结构体(图书管理系统雏形)
#include <stdio.h> #include <string.h> char *s_gets(char *st, int n); #define MAXTITL 40 #define MAXAUTL 40 #define MAXBKS 100 struct book { char title[MAXTITL]; char author[MA...
2019-03-20 20:23:04
446
原创 复习文件IO
#include <stdio.h> #include <stdlib.h> #define LEN 99 int main(void) { FILE *fp; char name[LEN]; char words[LEN]; puts("请输入您要添加内容的文件的名字:"); fscanf(stdin, "%s", name...
2019-03-20 13:51:34
118
原创 复习用字符数组表示字符串
#include<stdio.h> #include<string.h> #include<stdlib.h> #define MAX 20 int main(void) { char name1[MAX]; ...
2019-03-20 13:25:34
462
原创 复习 求数组最大与最小值的差值
#include <stdio.h> #define LINE 10 #define COL 5 double sub(int a, int b, const double (*p)[b]);//数组求差值函数 void give(int a, int b, double p[][b]);//数组赋值函数 ...
2019-03-19 19:35:27
1521
原创 计算指定范围的平方和(含错误处理)
#include &amp;lt;stdio.h&amp;gt; #include &amp;lt;stdbool.h&amp;gt; double sum_squares(long a, long b);//计算指定范围的平方和 bool bad_limits(long begin, long end, long low, long high);//判断上界及下界 long get_lon...
2019-03-09 19:56:47
360
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅