Programming in C# question -
After creating this code:
console. WrightLine ("Hello, and welcome to the Shell bomber \ n"); Console.light line ("You will calculate distance in this game \ n"); Console.light line ("a shell rises and travels on land ^ _ ^ \ n"); Console.light line ("theta =?"); // Initial angle that you ask the user to double theta = Double.Parse (Console.ReadLine ()); Console.witline ("v_o =?"); // Initial velocity which you will ask the user double v_o = Double.Parse (Console.ReadLine ()); Console.light line ("calculation of v_ox"); // vox = v_ocos (theta double v_ox = v_o * monastery.ca); // Math. Cos (theta) method theta = theta * monastery. Pi / 180.0; // degree to radian console. ReadLine ( );
Whether the program is going to automatically convert the values of double v_ox = v_o * Math.CESS (theta) from an input of an angle to the user's input and The initial value? Because when I run it, the program is not calculating the value? Did I do something wrong or Or how did I work it?
you Once you have done this, simply type the value for the console: theta in radians
< Code> console.light line ("calculate v_ox"); // vox = v_ocos (theta theta = theta * monastery .pi / 180.0; // from the converts degree to the radius double v_ox = v_o * monastery. Cos (theta) ; // Math. Caus (Thita) method of console Abuse in. Write Line ( "v_ox == {0}", v_ox); // Show it, if you want to see the Value Console. Readline ();
Comments
Post a Comment