当前位置:网站首页>Xiao Wang's interview training task
Xiao Wang's interview training task
2022-06-27 21:38:00 【continueLR】
Catalog
XZK-JAVA- Regional missions -010102- Xiao Wang's interview ( Basic grammar )
4. Please write a paragraph that complies with the coding specification Hello World Code
XZK-JAVA- Regional missions -010102- Xiao Wang's interview ( Basic grammar )
1. Define an integer variable and assign any five digit positive integer as the initial value , Judge whether it is a five digit palindrome number ?
public class Demo {
public static void main(String[] args){
int num = 12321;
int ge = num%10;
int shi = num%100/10;
int qian = num%10000/1000;
int wan = num%100000/10000;
System.out.println(ge);
System.out.println(shi);
System.out.println(qian);
System.out.println(wan);
if(ge==wan&&shi==qian){
System.out.println(" This number is the palindrome number ");
}else {
System.out.println(" This number is not a palindrome number ");
}
}
}Five palindromes , Existing = ten thousand , Ten = thousand ;
2. Define an integer variable and assign any five digit positive integer as the initial value , Output the sum of the numbers
public class Eemo {
public static void main(String[]args){
int num = 12345;
int ge = num%10;
int shi = num%100/10;
int bai = num%1000/100;
int qian = num%10000/1000;
int wan = num%100000/10000;
int sum = ge+shi+bai+qian+wan;
System.out.println(sum);
}
}
3. Defining integer variables a、b, Write will a、b A program for exchanging the values of two variables ( The third variable cannot be used )
public static void main(String[] args) {
int a=10;
int b=12;
a=a+b;
b=a-b;
a=a-b;
System.out.println(a+" and "+b);
}
}4. Please write a paragraph that complies with the coding specification Hello World Code
public class HolleWord {
public static void main(String[] args) {
System.out.println("HolleWord");
}
}
边栏推荐
- ARCS模型介绍
- 创建对象时JVM内存结构
- SQL必需掌握的100个重要知识点:使用函数处理数据
- mysql使用笔记一
- Unleash the innovative power of open source database | [Gansu] opengauss meetup has come to a successful conclusion
- How to do a good job of gateway high availability protection in the big promotion scenario
- 华为伙伴暨开发者大会2022开源时刻全纪录
- 于文文、胡夏等明星带你玩转派对 皮皮APP点燃你的夏日
- Go从入门到实战——行为的定义和实现(笔记)
- Codeforces Round #723 (Div. 2)
猜你喜欢

Go from entry to practice - multiple selection and timeout control (notes)

CORBA 架构体系指南(通用对象请求代理体系架构)

Codeforces Round #719 (Div. 3)

Galaxy Kirin system LAN file sharing tutorial

微服务之远程调用

BTC and eth recapture the lost land! Leading the market recovery? Encryption will enter the "ice age"!

MySQL performance optimization index function, hidden, prefix, hash index usage (2)

VMware vSphere ESXi 7.0安装教程

划重点!国产电脑上安装字体小技巧

Go从入门到实战——协程机制(笔记)
随机推荐
Go从入门到实战——CSP并发机制(笔记)
Scrum和看板的区别
Use the storcli tool to configure raid. Just collect this article
如何将队列里面的内容没秒钟执行一次优先级
SQL必需掌握的100个重要知识点:过滤数据
GFS分布式文件系统
空指针异常
Codeforces Round #719 (Div. 3)
squid代理服务器
linux下安装oracle11g 静默安装教程
猜拳游戏专题训练
Go从入门到实战——仅执行一次(笔记)
Very comprehensive dolphin scheduler installation and use documents
Tiktok's interest in e-commerce has hit the traffic ceiling?
Here are 12 commonly used function formulas for you. All used ones are good
通过CE修改器修改大型网络游戏
Go from introduction to actual combat - context and task cancellation (notes)
Cerebral cortex: predicting children's mathematical skills from task state and resting state brain function connections
小王的面试训练任务
oracle迁移mysql唯一索引大小写不区分别怕