2006-11-13 16:36:23★彩虹★
★繪圖系統(更改版)★
package xx1;
public class sample007
{
public static void main(String[] args)
{
double t[]=new double[100];
double s[]=new double[100];
for(int i=0; i<100; i=i+1)
{
t[i]=i*6.28/100;
double xx=t[i];
s[i]=sinx(t[i])*40+40;
}
for(int i=0; i<100; i=i+1)
{
for(int j=0; j
{
System.out.print(" ");
}
System.out.println("*");
}
}
public static double sinx(double x)
{
return Math.sin(x);
}
}
☆.☆.☆.☆.☆.☆.☆.☆.☆.☆.☆. ☆.☆.☆.☆.☆.☆.
這是經由我個人更改出來的
我覺得圖形比較正確了點
至於下面那個
是我照老師給的那張單子上打的
我覺得好像都可以吧
總之兩個版本都參考看看吧
有任何問題請踴躍發言
我會盡力為大家服務的
有問題也可以提出來討論的
public class sample007
{
public static void main(String[] args)
{
double t[]=new double[100];
double s[]=new double[100];
for(int i=0; i<100; i=i+1)
{
t[i]=i*6.28/100;
double xx=t[i];
s[i]=sinx(t[i])*40+40;
}
for(int i=0; i<100; i=i+1)
{
for(int j=0; j
System.out.print(" ");
}
System.out.println("*");
}
}
public static double sinx(double x)
{
return Math.sin(x);
}
}
☆.☆.☆.☆.☆.☆.☆.☆.☆.☆.☆. ☆.☆.☆.☆.☆.☆.
這是經由我個人更改出來的
我覺得圖形比較正確了點
至於下面那個
是我照老師給的那張單子上打的
我覺得好像都可以吧
總之兩個版本都參考看看吧
有任何問題請踴躍發言
我會盡力為大家服務的
有問題也可以提出來討論的
嘻嘻
點近來看看
有程式耶~
正在煩惱...
剛好提拱你參考囉~
加油!^ ^ 2006-11-13 23:49:42