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
icon
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.

 

 

steps

Step by step

Solved in 2 steps

Blurred answer