Write a statement that rounds the value stored in the dblRate variable to one decimal place and then assigns the result to the variable.
Write a statement that rounds the value stored in the dblRate variable to one decimal place and then assigns the result to the variable.
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter6: Sub And Function Procedures
Section: Chapter Questions
Problem 3MQ3
Related questions
Question
Write a statement that rounds the value stored in the dblRate variable to one decimal
place and then assigns the result to the variable.
Expert Solution
Step 1
Statement :
dblRate = Math.Round(dblRate, 1)
The Math.Round is basically a mathematical function which is utilized to return the whole value number closest to the value for the defined number of decimal places.
Step by step
Solved in 2 steps
Knowledge Booster
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.Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning