当前位置:网站首页>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");
}
}
边栏推荐
- Full record of 2022 open source moment at Huawei partners and Developers Conference
- 神奇的POI读取excel模板文件报错
- Release of global Unicorn list in 2021: the full list of 301 Unicorn enterprises in China is coming!
- VMware vSphere esxi 7.0 installation tutorial
- Cerebral cortex: predicting children's mathematical skills from task state and resting state brain function connections
- oss上传调用的是哪个方法
- 送你12个常用函数公式,用过的都说好
- 本周二晚19:00战码先锋第8期直播丨如何多方位参与OpenHarmony开源贡献
- SQL server for circular usage
- squid代理服务器
猜你喜欢
CEPH distributed storage
GFS分布式文件系统
VMware vSphere ESXi 7.0安装教程
Use the storcli tool to configure raid. Just collect this article
SQL server for circular usage
KDD 2022 | graph neural network generalization framework under the paradigm of "pre training, prompting and fine tuning"
How to do a good job of gateway high availability protection in the big promotion scenario
PCIE知识点-008:PCIE switch的结构
Go从入门到实战—— 多路选择和超时控制(笔记)
SQL必需掌握的100个重要知识点:使用函数处理数据
随机推荐
集合代码练习
oracle迁移mysql唯一索引大小写不区分别怕
流程控制任务
linux下安装oracle11g 静默安装教程
体验Navicat Premium 16,无限重置试用14天方法(附源码)
Cerebral cortex: predicting children's mathematical skills from task state and resting state brain function connections
Go从入门到实战——所有任务完成(笔记)
释放开源数据库创新力量 | 【甘肃】openGauss Meetup圆满结束
SQL必需掌握的100个重要知识点:使用函数处理数据
Safe and efficient, non-contact "hand brushing" identification helps epidemic prevention and control
AI 绘画极简教程
Love math experiment | phase 9 - intelligent health diagnosis using machine learning method
数据平台调度升级改造 | 从Azkaban 平滑过度到Apache DolphinScheduler 的操作实践
SQL Server for循环用法
今晚战码先锋润和赛道第2期直播丨如何参与OpenHarmony代码贡献
覆盖接入2w+交通监测设备,EMQ 为深圳市打造交通全要素数字化新引擎
有时间看看ognl表达式
Goldfish rhca memoirs: do447 managing projects and carrying out operations -- creating job templates and starting jobs
ICML2022 | 可扩展深度高斯马尔可夫随机场
Contest 2050 and Codeforces Round #718 (Div. 1 + Div. 2)