当前位置:网站首页>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");
}
}
边栏推荐
- Goldfish rhca memoirs: do447 managing projects and carrying out operations -- creating job templates and starting jobs
- SQL Server for循环用法
- 鲜为人知的mysql导入数据
- Use the storcli tool to configure raid. Just collect this article
- The difference between scrum and Kanban
- oss上传调用的是哪个方法
- GoLand永久激活
- Cerebral cortex: predicting children's mathematical skills from task state and resting state brain function connections
- Unleash the innovative power of open source database | [Gansu] opengauss meetup has come to a successful conclusion
- White whoring red team goby & POC, how do you call white whoring?
猜你喜欢

DO280OpenShift访问控制--security policy和章节实验

GFS distributed file system

Codeforces Round #717 (Div. 2)

Oracle的CTAS能不能将约束等属性带到新表?

覆盖接入2w+交通监测设备,EMQ 为深圳市打造交通全要素数字化新引擎

squid代理服务器

Serveur mandataire SQUID

After being forced to develop the app within 20 days, the group was laid off, and the technical director angrily criticized it: I wish "closure as soon as possible!"

数据平台调度升级改造 | 从Azkaban 平滑过度到Apache DolphinScheduler 的操作实践

Go从入门到实战——共享内存并发机制(笔记)
随机推荐
Very comprehensive dolphin scheduler installation and use documents
Love math experiment | phase VI - Financial anti fraud case study
Go from introduction to practice - Interface (notes)
VMware vSphere ESXi 7.0安装教程
语言弱点列表--CWE,一个值得学习的网站
行业案例|从零售之王看银行数字化转型的运营之道
使用storcli工具配置RAID,收藏这一篇就够了
gomock mockgen : unknown embedded interface
麒麟V10安装字体
释放开源数据库创新力量 | 【甘肃】openGauss Meetup圆满结束
100 important knowledge points that SQL must master: using functions to process data
送你12个常用函数公式,用过的都说好
华为伙伴暨开发者大会2022开源时刻全纪录
Flask----应用案例
系统自带的karsonzhang/fastadmin-addons报错
2021全球独角兽榜发布:中国301家独角兽企业全名单来了!
Covering access to 2w+ traffic monitoring equipment, EMQ creates a new digital engine for all elements of traffic in Shenzhen
Go from entry to practice -- CSP concurrency mechanism (note)
Go from introduction to practice - polymorphism (note)
uniapp拦截请求