bzu-java(一)
//import java.util.Scanner;
//import java.util.Scanner;
import java.text.DecimalFormat;
public class test1{
public static void main(String arg[])
{
//Scanner input=new Scanner(System.in);
//int f=input.nextInt();
for(int i=300;i>=0;i-=20)
print_out(i);
}
static void print_out(int f ){
double c=(5.0/9)*(f-32.0);
DecimalFormat decimalFormat=new DecimalFormat(".0");
String p=decimalFormat.format(c);
System.out.println(f+" "+p );
}
}
public class test2{
public static void main(String arg[])
{
for(int i=100;i<=999;i++)
{ int ge=i%10;
int shi=i/10%10;
int bai=i/100;
if(ge*ge*ge+shi*shi*shi+bai*bai*bai==i)
System.out.println(i);
}
}
}
public class test3{
public static void main(String args[]){
long sum=0;
for(int i=1;i<=20;i++)
{ long temp=1;
for(int n=1;n<=i;n++)
temp=n*temp;
sum=sum+temp;
}
System.out.println(sum);
}
}
import java.util.Scanner;
public class test4{
public static void main(String args[]){
Scanner input=new Scanner(System.in);
System.out.println("please input fangzhen's row and col,and entrue \"Enter\"");
int n=input.nextInt();
int fangzhen[][]=new int[n][n];
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
fangzhen[i][j]=input.nextInt();
int sum=0;
for(int i=0;i<n;i++)
sum+=fangzhen[i][i]+=fangzhen[i][n-i-1];
System.out.println(sum);
}
}
import java.util.Scanner;
public class test5{
public static void main(String args[]){
Scanner input=new Scanner(System.in);
System.out.println("please input Array's length,and entrue \"Enter\"");
int n=input.nextInt();
int fangzhen[]=new int[n];
for(int i=0;i<n;i++)
fangzhen[i]=input.nextInt();
int zuida=fangzhen[0],zuida_index=0;
int zuixiao=fangzhen[0],zuixiao_index=0;
for(int i=0;i<n;i++)
if(fangzhen[i]>zuida){
zuida=fangzhen[i];
zuida_index=i;}
for(int i=0;i<n;i++)
if(fangzhen[i]<zuixiao){
zuixiao=fangzhen[i];
zuixiao_index=i;}
int m=fangzhen[0];
fangzhen[0]=fangzhen[zuida_index];
fangzhen[zuida_index]=m;
m=fangzhen[n-1];
fangzhen[n-1]=fangzhen[zuixiao_index];
fangzhen[zuixiao_index]=m;
for(int i=0;i<n;i++)
System.out.print(fangzhen[i]);
}
}