Need_More_Sleep
Need Help With These 2 HW Questions.
double v1 = 45.7;
double v2 = 10.5;
int v3 = 5;
// v1 += v1++;
// --v2;
double ans1;
ans1 = (int)v1 + v2 / (double)v3;
Console.WriteLine(ans1);
// Question 3.1: Design a C# program that prompts the result (ans) of the following expression.
double v1 = 45.7;
double v2 = 10.5;
int v3 = 5;
// v1 += v1++;
int ans2;
ans2 = (int)v1 + --v2 / (double)v3++;
Console.WriteLine(ans2);
22 replies