100 703
Assignments Done
97.9%
Successfully Done
In July 2021

# Answer to Question #12173 in C# for Gia

Question #12173
The cost of a brand new car is ₱420,000 for GL model and ₱3398,000 XL model. If a car phone will be installed, an additional ₱40,000 will be added to the cost. Moreover, 15% discount on the total cost will be given if the buyer pays in full(not installment), Write a Program that would input the car model bought, whether with car phone, use code &lsquo;&rsquo;W&rsquo;&rsquo; for with car phone and &lsquo;&rsquo;O&rsquo;&rsquo; for without car phone) and whether it will be paid in full(use code&rsquo;&rsquo;F&rsquo;&rsquo; for full payments and &lsquo;&rsquo;I&rsquo;&rsquo; for instalment).Program must then output the cost of the car.

* ₱ is the symbol for Philippine peso :) thank you Sir/Ma'am
1
2012-07-26T08:51:19-0400
String model;
char phone;
char
paid;
double cost=0;
Console.WriteLine(&quot;Enter
model: &quot;);
if (model
== &quot;GL&quot;)
{
cost = 420000;

}
if (model == &quot;XL&quot;)
{
cost =
3398000;
}
Console.WriteLine(&quot;Car phone:
&quot;);
if
(phone == 'W')
{
cost = cost +
40000;
}
Console.WriteLine(&quot;Full or instalment:
&quot;);
if
(paid == 'F')
{
cost = cost - 0.15 *
cost;
}
Console.WriteLine(&quot;Cost: &quot; + cost);

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!