JAVA代码

JAVA代码


2024年5月16日发(作者:荣耀play3怎么样)

1.扫描仪 Scanner

import r;

public class tests {

public static void main(String[] args) {

n("输入您的学号:");

}

}

int num=t();

n("输入您您最喜欢的字母:");

String hehe=();

n("输出您最喜欢的字母"+hehe);

n("输出您的学号"+num);

Scanner in=new Scanner();

n("输入您的名字:");

String name=();

n("输出您的名字"+name);

2. Boolean类型(判断真假)

public class sqwjdv {

public static void main(String[] args) {

}

int A=1;

int B=2;

boolean Q;

Q=A==B;

n("输出="+Q);

3.逻辑运算符

import r;

public class tests {

public static void main(String[] args) {

Scanner in=new Scanner();

n("输入您的JAVa成绩");

int java=t();

n("输入您的数学成绩");

if(!(java>85)&&math>90){

}

n("测试");

n("你好样的,帅哥");

int math=t();

}

}

else 条件结构

import .*;

public class tests {

public static void main(String[] args) {

}

}

5.多重if结构 else if

import .*;

public class tests {

public static void main(String[] args) {

}

}

结构

import .*;

Scanner in=new Scanner();

n("输入您的数学成绩");

if(math>=90){

n("优秀");

Scanner in=new Scanner();

n("输入您的数学成绩");

if(math>=90){

n("你好样的,帅哥");

int math=t();

}else{

n("少玩");

}

int math=t();

} else if(math>=80){

n("良好");

} else if(math>=60){

} else{

}

n("呵呵");

n("及格");


发布者:admin,转转请注明出处:http://www.yc00.com/num/1715790679a2672131.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信