### i want to rerun this program i need help

 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 // Physics theorems #include #include #include #define pi 3.14159265 #define RPD (pi/180) #define DPR (180/pi) int main() { clrscr(); int p,q,P,Q,pq; float theeta,Theeta,cA,sA,r,R,tA,alpha; cout<<"\n\n This Is Paralellogram Law Of Vectors"; cout<<"\n\nProvide with values of two vectors and then theeta"; cin>>p>>q>>theeta; Theeta=theeta*=RPD; cA=cos(Theeta); sA=sin(Theeta); P=p*p; Q=q*q; pq=2*p*q*cA; r=P+Q+pq; R=pow(r,0.5); cout<<"\n\nResultant Vector="<>ax>>ay>>az; cout<<"\n\n Enter Components of Vector B"; cin>>bx>>by>>bz; ab=ax*bx+ay*by+az*bz; cout<<"\n\nScalar Product of Vector="<>px>>py>>pz; cout<<"\n\nProvide with components of vector Q"; cin>>qx>>qy>>qz; pq1=(py*qz)-(pz*qy); pq2=(pz*qx)-(px*qy); pq3=(px*qy)-(py*qx); cout<<"\n\nVector Product of two Vectors="; cout<<"\n"<
Last edited on
Put each part of your code inside of a while loop starting from the first cout until the last one (before each getch()). Something like this:

 1234567891011 ... your code ... while((p * q) != 0) // when p or q is zero will stop this first part of the programme and continue whith the rest one included inside of a while loop. { cout <<"\n\n...and so on ......your code.... cout << "n\nDirection..." << ... }

and so on with the rest two parts: Scalar product and Vector product.
Succes!
Last edited on
thankyou very very much for this reply i worked it as you said and relly Succes!!!!!!!!
Topic archived. No new replies allowed.