自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 输出字符菱形

C语言中: int n; scanf("%d",&n); printf("%4d",n); 结果就是输出占四个位置,前三个是空格,最后一个是输出的数字。

2021-01-30 13:29:12 830

原创 C语言文件

2020-04-25 18:57:47 97

原创 递归

public class Textdigui { public static void main(String args[]){ System.out.println(“10的阶乘是” + factorialoop(10) ); } static long f(int n){ if(n == 1){ return 1; }else{ return ...

2019-12-17 16:26:33 94

原创 java的 “方法”

public class TextMethod { public static void main(String[] args) { TextMethod tm = new TextMethod(); //面向对象 tm.add1(20,49,50); //调用add1方法 int z = tm.add1(20,23,34) + 1324; System.out.println(z);...

2019-12-11 20:42:20 112

原创 带标签的continue

public class Textcontiue { public static void main(String[] args){ int c =0; //计数器 outer:for(int a = 101;a <= 150;a++){ for(int b = 2;b< a/2;b++){ if(a % b ==0){ ...

2019-12-11 19:53:54 112

原创 九九乘法表

public class Textxunhuan { public static void main(String[] args){ for(int n = 1;n <= 9;n++){ for(int m =1;m <=n;m++){ System.out.print(m +""+n+"="+ mn +"\t"); } System.out.println(); } ...

2019-12-10 16:38:25 62

原创 java for循环

public class Text1{ public static void main(String[] args){ int sum = 0; for(int i = 1; i < =100; i++){ sum = sum + i; } System.out.println(sum); /** 1:执行初始化语句 i = 1; 2:判断i <= 100; 3:执行循环体; 4:步进...

2019-12-04 20:24:25 87

原创 Switch 语句

switch(表达式){ case 值1: 语句序列1; break; case 值2: 语句序列2; break; defalut: 语句序列3; break; }

2019-12-03 19:23:41 64

原创 Scanner 键盘输入 交互式

import java.util.Scanner; public class Text { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); System.out.println(“请输入你的名字:”); String name = scanner.nextLine(); System...

2019-12-02 22:13:47 201

空空如也

空空如也

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

TA关注的人

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