public static void main(String[] args) {
// TODO Auto-generated method stub
int count=0;
for(int i =101;i<=2100;i++){
if(i%4000||(i%40&&i%100!=0)){
System.out.print(i+" ");
count++;
if(count%10==0){
System.out.println();
}
}
}
System.out.println("\nThe total number is "+count);
}
}
=================================================================
package demo;
import java.util.Scanner;
public class diwuzhang {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
String[] months = {“Jan”,“Feb”,“Mar”,“Apr”,“May”,“Jun”,“Jul”,“Aug”,“Sep”,“Oct”,“Nov”,“Dec”};
System.out.print("Enter the year: ");
int year=input.nextInt();
String[] week={“Mon”,“Tue”,“Wed”,“Thu”,“Fri”,“Sat”,“Sun”};
int[] Days={31,28,31,30,31,30,31,31,30,31,30,31};
if((year%4000)||(year%40&&year%100!=0)){
Days[1]=29;
}
System.out.print("Enter the day: ");
int day = input.nextInt();
for(int i=1;i<=12;i++){
System.out.printf(“%s 1, %d is %s\n”, months[i-1],year,week[day-1]);
day=(day+Days[i-1])%7;
if(day==0)
day=7;
}
}
}
=================================================================
package demo;
import java.util.Scanner;
public class diwuzhang {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
String[] months = {“Jan”,“Feb”,“Mar”,“Apr”,“May”,“Jun”,“Jul”,“Aug”,“Sep”,“Oct”,“Nov”,“Dec”};
System.out.print("Enter the year: ");
int year=input.nextInt();
String[] week={“Mon”,“Tue”,“Wed”,“Thu”,“Fri”,“Sat”,“Sun”};
int[] Days={31,28,31,30,31,30,31,31,30,31,30,31};
if((year%4000)||(year%40&&year%100!=0)){
Days[1]=29;
}
System.out.print("Enter the day: ");
int day = input.nextInt();
for(int i=1;i<=12;i++){
System.out.println(" “+months[i-1]+” “+year+” ");
System.out.println(“---------------------------------------”);
System.out.print(“Sun Mon Tue Wed Thu Fri Sat”);
System.out.println();
int count=0;
int base = 0;
for(int j=0;j<day;j++){
System.out.print(" ");
count++;
}
for(int j=1;j<=Days[i-1];j++){
System.out.printf("%3d ", j);
count++;
if(count%7==0&&count!=base)
{
System.out.println();
}
}
System.out.println();
System.out.println();
day=(day+Days[i-1])%7;
}
}
}
=================================================================
package demo;
import java.util.Scanner;
public class diwuzhang {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
System.out.print("Enter the money: ");
double money = input.nextDouble();
double plus =money;
System.out.print("Enter year rate: ");
double yearRate = input.nextDouble();
System.out.print("Enter the months: ");
int months = input.nextInt();
for(int i=1;i<months;i++)
money = (money+plus)*(1+yearRate/1200);
System.out.printf(“The result money is %.3f\n”, money);
}
}
=================================================================
package demo;
import java.util.Scanner;
public class diwuzhang {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
System.out.print("Enter the initial deposit amount: ");
double money = input.nextDouble();
System.out.print("Enter annual percentage yield: ");
double rate = input.nextDouble();
System.out.print("Enter maturity period (number of month): ");
int month = input.nextInt();
System.out.println(“Month CD Value”);
for(int i=1;i<=month;i++)
{
money*=(1+rate/1200);
System.out.printf(“%2d %.2f\n”, i,money);
}
}
}
=================================================================
package demo;
import java.util.Scanner;
public class diwuzhang {
public static void main(String[] args) {
// TODO Auto-generated method stub
int num1 = (int)(Math.random()*10);
int num2 = (int)(Math.random()*10);
while(num2==num1)
num2 = (int)(Math.random()*10);
System.out.println(“The lottery number is “+num1+”,”+num2);
}
}
=================================================================
package demo;
import java.util.Scanner;
public class diwuzhang {
public static void main(String[] args) {
// TODO Auto-generated method stub
for(int i=1;i<10000;i++){
int sum = 0;
for(int j=1;j<i;j++){
if(i%j==0)
sum+=j;
}
if(sum==i)
System.out.println(i);
}
}
}
=================================================================
package demo;
import java.util.Scanner;
public class diwuzhang {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner input = new Scanner(System.in);
int comWin = 0;
int manWin = 0;
String[] a = {“stone”,“scissors”,“paper”};
while(comWin<=2&&manWin<=2)
{
System.out.print(“Enter 0 for stone, 1 for scissors, 2 for paper:”);
int hum = input.nextInt();
int com = (int)(Math.random()*3);
if(com-hum==-1||com-hum==2)
{
System.out.println(“Computer is “+a[com]+”, you are “+a[hum]+”. You lose!”);
comWin++;
}
else if(hum-com==-1||hum-com==2)
{
System.out.println(“Computer is “+a[com]+”, you are “+a[hum]+”. You win!”);
manWin++;
}
else
System.out.println(“Computer is “+a[com]+”, you are “+a[hum]+”. It is a draw.”);
}
}
}
=================================================================
package demo;
import java.util.Scanner;
public class diwuzhang {
public static void main(String[] args) {
// TODO Auto-generated method stub
double sum=0;
for(int i=625;i>=2;i–)
sum+=1.0/(Math.sqrt(i-1)+Math.sqrt(i));
System.out.println("The result is "+sum);
}
}
小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数初中级前端工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Web前端开发全套学习资料》送给大家,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频
如果你觉得这些内容对你有帮助,可以添加下面V无偿领取!(备注:前端)
js基础
1)对js的理解?
2)请说出以下代码输出的值?
3)把以下代码,改写成依次输出0-9
4)如何区分数组对象,普通对象,函数对象
5)面向对象、面向过程
6)面向对象的三大基本特性
7)XML和JSON的区别?
8)Web Worker 和webSocket?
9)Javascript垃圾回收方法?
10)new操作符具体干了什么呢?
11)js延迟加载的方式有哪些?
12)WEB应用从服务器主动推送Data到客户端有那些方式?
[外链图片转存中…(img-tnI6Qoeq-1710604561324)]
[外链图片转存中…(img-rrP3XRmh-1710604561324)]
[外链图片转存中…(img-7LkrmfVS-1710604561325)]
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频
如果你觉得这些内容对你有帮助,可以添加下面V无偿领取!(备注:前端)
[外链图片转存中…(img-Xvpj8ZgC-1710604561325)]
js基础
1)对js的理解?
2)请说出以下代码输出的值?
3)把以下代码,改写成依次输出0-9
4)如何区分数组对象,普通对象,函数对象
5)面向对象、面向过程
6)面向对象的三大基本特性
7)XML和JSON的区别?
8)Web Worker 和webSocket?
9)Javascript垃圾回收方法?
10)new操作符具体干了什么呢?
11)js延迟加载的方式有哪些?
12)WEB应用从服务器主动推送Data到客户端有那些方式?
[外链图片转存中…(img-iCaJQ5Iz-1710604561326)]
[外链图片转存中…(img-w5nj4Vvo-1710604561326)]