TAILIEUCHUNG - Beginning Visual Basic 2005 phần 2

Tuy nhiên, không có sự khác biệt trong cách một trong các hoạt động này được thực hiện. Tại đây, bạn thiết lập dblNumber là một số thập phân và sau đó nhân nó bằng một số thập phân: Thiết lập số, nhân số, và hiển thị kết quả d | Chapter 3 rather than an integer operation. Also notice that you have used a different Modified Hungarian notation prefix to signify that this variable contains a number that is of the Double data type. However there s no difference in the way either of these operations is performed. Here you set dblNumber to be a decimal number and then multiply it by another decimal number Set number multiply numbers and display results dblNumber dblNumber Multiplication test. dblNumber Floating Points When you run this you get a result of which as you can see has a decimal component and therefore you can use this in calculations. Of course floating-point numbers don t have to have an explicit decimal component Set number divide numbers and display results dblNumber 12 dblNumber 7 Division test. dblNumber Floating Points This result still yields a floating-point result because dblNumber has been set up to hold such a result. You can see this by your result of which is the same result you were looking for when you were examining integer math. A floating-point number gets its name because it is stored like a number written in scientific notation on paper. In scientific notation the number is given as a power of ten and a number between 1 and 10 that is multiplied by that power of ten to get the original number. For example 10 001 is written _ 104 and is written _ 10 . The decimal point floats to the position after the first digit in both cases. The advantage is that large numbers and small numbers are represented with the same degree of precision in this example one part in 10 000 . A floating-point variable is stored in the same way inside the computer but in base two instead of base ten see Storing Variables later in this section . Other States Floating-point variables can hold a few other values besides decimal numbers. Specifically these are NaN which means not a number Positive .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.