use only C# programming Write a method call CubeIt(int x, ref int cube) that takes two arguments and does not return a value. The method will cube the first argument and assign it to the second argument. In your main, call this method twice and print the value of the parameters after each method call. Write a method with the following header: static void CalculateTuitionFee(int numberOfCourses, double costPerCourse, ref double fees). This method will calculate and assign the required fees amount to the third argument. [Fees = number of courses * cost per course + 15.25]. From your program Main() method, call the CalculateTuitionFee () method four times supplying different arguments each time and display the value of the third argument after each method call. Write a method that takes four parameter of type int. The method will assign the sum of the first two arguments to the third and the difference of the first two to the fourth. This method should be coded so that the calling method will use the value of the third and fourth parameters. Call this method about three times and print out the value of the four parameters after each method call. The argument is taken as degrees Write a method with header static void CalculateTrigValues(double degrees, out double sine, out double cosine, out double tangent). The method will use the first argument to compute the values of the other three arguments. Used the method Math.Sin, Math.Cos and Math.Tan to compute the second to fourth arguments respectively. [radians = degrees * Math.Pi /180]. In the Main() method, invoke this method 20 times with the first argument taking the values 0, 5, 10, … 95 and display the four arguments in a professional tabular format. The argument is taken as radians Write a method that takes three parameters of type double: the first represents an angle, the other two represents the sine and cosine of the angle respectively. The method must be able to change the actual value of the second and third argument.
use only C#
-
Write a method call CubeIt(int x, ref int cube) that takes two arguments and does not return a value. The method will cube the first argument and assign it to the second argument.
In your main, call this method twice and print the value of the parameters after each method call. -
Write a method with the following header: static void CalculateTuitionFee(int numberOfCourses, double costPerCourse, ref double fees). This method will calculate and assign the required fees amount to the third argument. [Fees = number of courses * cost per course + 15.25].
From your program Main() method, call the CalculateTuitionFee () method four times supplying different arguments each time and display the value of the third argument after each method call. -
Write a method that takes four parameter of type int. The method will assign the sum of the first two arguments to the third and the difference of the first two to the fourth. This method should be coded so that the calling method will use the value of the third and fourth parameters.
Call this method about three times and print out the value of the four parameters after each method call.The argument is taken as degrees
-
Write a method with header static void CalculateTrigValues(double degrees, out double sine, out double cosine, out double tangent). The method will use the first argument to compute the values of the other three arguments. Used the method Math.Sin, Math.Cos and Math.Tan to compute the second to fourth arguments respectively. [radians = degrees * Math.Pi /180].
In the Main() method, invoke this method 20 times with the first argument taking the values 0, 5, 10, … 95 and display the four arguments in a professional tabular format.The argument is taken as radians
-
Write a method that takes three parameters of type double: the first represents an angle, the other two represents the sine and cosine of the angle respectively. The method must be able to change the actual value of the second and third argument.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images