Question: You are writing a program that needs to use Euler's Constant (0.57721566). Indicate how you would declare this value in C#. For Q#26-32, evaluate the
- You are writing a program that needs to use Euler's Constant (0.57721566). Indicate how you would declare this value in C#.
For Q#26-32, evaluate the C# assignment statements and give the final resulting value assigned to the left-hand-side variable.
-
- int N = Convert.ToInt32(18.5);
- int X = Math.Ceiling(43 % 4 + Math.Pow(14.3, 3) / 70 1000 * Math.PI / 5 );
- string Y ="20"+"14";
- double A = Math.Floor(5 - 12.74);
- double A = Math.Round(5 1.74);
- double A = Math.Round(5 - 1.74 , 1) ;
- int X = 2; X*=X+4
-
- Evaluate the following C# assignment statement and give the resulting value assigned to the left-hand-side variable:
int x1 = Convert.ToInt32(Math.Ceiling(43 % 6 + 23 / Math.Pow(2,7) - 1000 / 26 ));
- Find the final value of X:
int X=0, N=0;
Single M = (Single) 42.3;
N = 3;
X = Convert.ToInt32(X + Math.Pow((M / N), N) + Math.Log(M) / Math.Pow(8.3, 2.0) + 12 * M);
- Given that double X=4.5, Y=3.2, Z=1 and Boolean B=False, evaluate each of the following Boolean expression:
X<=5 | ((Z/2) > 1 & ! B)
- Given: int A = 3, B=5; double C=3.14; string S = "123"; object R=4.32; Indicate if the following assignments are correct or, if not, correct them with any needed conversions and/or typecasts. For each, assume the variable values given above, not the values from the previous subparts.
- C = A;
- A = C;
- A = S;
- C = R;
- Write a console program to calculate the number of square feet of shingles needed to cover a gable (upside down V) roof. From the user, read in a) the length of the roof, b) the width of the roof, and c) the rise (number of feet roof rises vertically for every foot horizontally). To simplify, assume there are no eaves (overhang).
- Repeat the previous problem using Python.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
