Home Controller code: public string Interest (double principal, int time, double rate) { } double amount = 0; if (time > 10) { amount = principal *(1 + (time * rate)); } else if (time >= 5) { amount = principal * (0.5+ (time * rate)); } else { } amount = 1 + principal *(1 + (time rate)); return Convert.ToString("The amount that needs to be paid is: "+ amount);

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 19PE
icon
Related questions
Question

Give correct answer 

Home Controller code:
public string Interest (double principal, int time, double rate)
{
}
double amount
if (time> 10)
{
amount = principal * (1 + (time * rate));
=
}
else if (time >= 5)
}
else
{
}
0;
amount = principal * (0.5 + (time
* rate));
amount = 1 + principal * (1 + (time * rate));
return Convert.ToString("The amount that needs to be paid is: "+ amount);
What is the output if we browse to the following code based on the Home controller class (<
https://localhost:44363/Home/Interest?principal=2000&time=5&rate=1
s
Transcribed Image Text:Home Controller code: public string Interest (double principal, int time, double rate) { } double amount if (time> 10) { amount = principal * (1 + (time * rate)); = } else if (time >= 5) } else { } 0; amount = principal * (0.5 + (time * rate)); amount = 1 + principal * (1 + (time * rate)); return Convert.ToString("The amount that needs to be paid is: "+ amount); What is the output if we browse to the following code based on the Home controller class (< https://localhost:44363/Home/Interest?principal=2000&time=5&rate=1 s
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Keywords
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT