這是Herr Deng桑的教學blog,主要處理作業與班導事務,另外還有數位小品。
class B1{ public static void main(String[] args) { int j=3; float[] poly=new float[3]; poly[0]=1.4f; poly[1]=2.3f; poly[2]=3.7f; for(int i=poly.length-1;i>=0;i--) { System.out.print(poly[i]+"X^"+(i+1)+"+"); if(i==0) {System.out.print(poly[i]+"X^"+(i+1));} } System.out.println(); }}
class ex{ public static void main(String[] args) { int j=3; float[] poly=new float[3]; poly[0]=1.4f; poly[1]=2.3f; poly[2]=3.7f; for(int i=poly.length-1;i>=0;i--){ System.out.print(poly[i]+"X^"+(i+1)+"+"); if(i==0) {System.out.print(poly[i]+"X^"+(i+1));} } System.out.println(); }}
public class A2{ public static void main(String[] args) { int j=3; float[] poly=new float[3]; poly[0]=2.4f; poly[1]=3.6f; poly[2]=4.5f; for(int i=poly.length-1; i>=0; i--) { System.out.print(poly[i]+"X^"+(i+1)+" + "); if(i==0) { System.out.print(poly[i]+"X^"+(i+1)); } } System.out.println(); }}
class A1{public static void main(String[] args){int j=3;float[] poly=new float[3];poly[0]=1.4f;poly[1]=2.3f;poly[2]=3.7f;for(int i=poly.length-1;i>=0;i--){System.out.print(poly[i]+"X^"+(i+1)+"+");if(i==0){System.out.print(poly[i]+"X^"+(i+1));}}System.out.println();}}
public class 12{ public static void main(String[] args){int j=3;float[] poly=new float[3];poly[0]=2.4f;poly[1]=3.6f;poly[2]=4.5f;for(int i=poly.length-1; i>=0; i--){System.out.print(poly[i]+"X^"+(i+1)+" + ");if(i==0){System.out.print(poly[i]+"X^"+(i+1));}}System.out.println();}}
張貼留言
5 則留言:
class B1
{
public static void main(String[] args)
{
int j=3;
float[] poly=new float[3];
poly[0]=1.4f;
poly[1]=2.3f;
poly[2]=3.7f;
for(int i=poly.length-1;i>=0;i--)
{
System.out.print(poly[i]+"X^"+(i+1)+"+");
if(i==0)
{System.out.print(poly[i]+"X^"+(i+1));}
}
System.out.println();
}
}
class ex
{
public static void main(String[] args)
{
int j=3;
float[] poly=new float[3];
poly[0]=1.4f;
poly[1]=2.3f;
poly[2]=3.7f;
for(int i=poly.length-1;i>=0;i--)
{
System.out.print(poly[i]+"X^"+(i+1)+"+");
if(i==0)
{System.out.print(poly[i]+"X^"+(i+1));}
}
System.out.println();
}
}
public class A2
{
public static void main(String[] args)
{
int j=3;
float[] poly=new float[3];
poly[0]=2.4f;
poly[1]=3.6f;
poly[2]=4.5f;
for(int i=poly.length-1; i>=0; i--)
{
System.out.print(poly[i]+"X^"+(i+1)+" + ");
if(i==0)
{
System.out.print(poly[i]+"X^"+(i+1));
}
}
System.out.println();
}
}
class A1
{
public static void main(String[] args)
{
int j=3;
float[] poly=new float[3];
poly[0]=1.4f;
poly[1]=2.3f;
poly[2]=3.7f;
for(int i=poly.length-1;i>=0;i--)
{
System.out.print(poly[i]+"X^"+(i+1)+"+");
if(i==0)
{System.out.print(poly[i]+"X^"+(i+1));}
}
System.out.println();
}
}
public class 12{
public static void main(String[] args)
{
int j=3;
float[] poly=new float[3];
poly[0]=2.4f;
poly[1]=3.6f;
poly[2]=4.5f;
for(int i=poly.length-1; i>=0; i--)
{
System.out.print(poly[i]+"X^"+(i+1)+" + ");
if(i==0)
{
System.out.print(poly[i]+"X^"+(i+1));
}
}
System.out.println();
}
}
張貼留言