我正在为 A-Level 数学编写这个软件,我正在做力学部分,我正在做一个只有 UVA 数字的 suvat,我需要找到 S 而我没有 T。所以我重新安排了 v^2=u ^2+2as 得到 (v^2-u^2)/2a=s 但我只是没有得到正确的答案!怎么了:L。. .
if(selection == "1") {
float s,u,v,a,t;
cout<<"What is the value of U (Initial Velocity)" << endl;
cin >> u;
cout<<"What is the value of V (Final Velocity)" << endl;
cin >> v;
cout<<"What is the value of A (Acceleration)" << endl;
cin >> a;
s = (pow(2,v) - pow(2,u))/ (2*a);
cout << "The Value of S is "<< s << ". Dont forget unit!";
i++;
}
. . . .