public class aw
{
public static void main()
{
double t=0,n=1,h=0.01;
double rn=rn(t,n*h),vn=vn(t,n*h);
System.out.println(blad(rn,vn,n,h));
rn=r(t,n*h);vn=v(t,n*h,rn);
System.out.println(blad(rn,vn,n,h));
System.out.println(rn(t,n*h)+", "+vn(t,n*h)+"\n"+r(t,h)+", "+v(t,h,rn));
//for(int j=0;j<10;j++,h+=1/100)
{
for(int i=0;i<1000;i++,n+=1)
{
//System.out.println(t+" AAA "+n+", "+h+", "+);
String txt="";
txt+=(n+"\t");
rn=rn(t,n*h);vn=vn(t,n*h);
txt+=(blad(rn,vn,n,h)+"\t");
rn=r(t,n*h);vn=v(t,n*h,rn);
System.out.println((txt+blad(rn,vn,n,h)).replace(".",","));
}
}
}
public static double blad(double rn,double vn,double n,double h)
{
return Math.sqrt( Math.pow((rn-1-Math.sin(n*h)),2) + Math.pow((vn-Math.cos(n*h)),2) );
}
public static double rn(double t,double h)
{
double rt=rt(t),at=at(t),vt=vt(t);
return rt+h*vt;
}
public static double vn(double t,double h)
{
double rt=rt(t),at=at(t),vt=vt(t);
return vt+h*at;
}
public static double r(double t,double h)
{
double rt=rt(t),at=at(t),vt=vt(t);
return rt+h*vt+(h*h/2)*at;
}
public static double v(double t,double h,double rth)
{
double rt=rt(t),at=at(t),vt=vt(t);
return vt+(h/2)*(at+a(rth));
}
public static double a(/*double t,double h,*/double rth)
{
return 1-rth;
}
public static double rt(double t)
{
return 1+Math.sin(t);
}
public static double vt(double t)
{
return Math.cos(t);
}
public static double at(double t)
{
return 1-(rt(t));
}
}
{
public static void main()
{
double t=0,n=1,h=0.01;
double rn=rn(t,n*h),vn=vn(t,n*h);
System.out.println(blad(rn,vn,n,h));
rn=r(t,n*h);vn=v(t,n*h,rn);
System.out.println(blad(rn,vn,n,h));
System.out.println(rn(t,n*h)+", "+vn(t,n*h)+"\n"+r(t,h)+", "+v(t,h,rn));
//for(int j=0;j<10;j++,h+=1/100)
{
for(int i=0;i<1000;i++,n+=1)
{
//System.out.println(t+" AAA "+n+", "+h+", "+);
String txt="";
txt+=(n+"\t");
rn=rn(t,n*h);vn=vn(t,n*h);
txt+=(blad(rn,vn,n,h)+"\t");
rn=r(t,n*h);vn=v(t,n*h,rn);
System.out.println((txt+blad(rn,vn,n,h)).replace(".",","));
}
}
}
public static double blad(double rn,double vn,double n,double h)
{
return Math.sqrt( Math.pow((rn-1-Math.sin(n*h)),2) + Math.pow((vn-Math.cos(n*h)),2) );
}
public static double rn(double t,double h)
{
double rt=rt(t),at=at(t),vt=vt(t);
return rt+h*vt;
}
public static double vn(double t,double h)
{
double rt=rt(t),at=at(t),vt=vt(t);
return vt+h*at;
}
public static double r(double t,double h)
{
double rt=rt(t),at=at(t),vt=vt(t);
return rt+h*vt+(h*h/2)*at;
}
public static double v(double t,double h,double rth)
{
double rt=rt(t),at=at(t),vt=vt(t);
return vt+(h/2)*(at+a(rth));
}
public static double a(/*double t,double h,*/double rth)
{
return 1-rth;
}
public static double rt(double t)
{
return 1+Math.sin(t);
}
public static double vt(double t)
{
return Math.cos(t);
}
public static double at(double t)
{
return 1-(rt(t));
}
}
-
28 marca 2017, 14:49:18Mogę wiedzieć co to jest?
-
24 marca 2017, 19:06:56#include
using namespace std;
int main() {
cout<<"I hope you get cancer";
}
return 0;
Co tam kodujesz?