microsoft visual c 2008 step by step phần 2

Gõ 13 trong hộp văn bản bên phải của toán hạng. Bây giờ bạn có thể áp dụng bất kỳ của các nhà khai thác các giá trị trong các hộp văn bản. 5. Nhấp vào - Phép trừ nút, và sau đó nhấp vào Tính toán. Các văn bản thay đổi biểu hiện hộp văn bản 54 - 13, và giá trị số 41 xuất hiện trong hộp kết quả, như thể hiện trong hình dưới đây: | Chapter 2 Working with Variables Operators and Expressions 41 4. Type 13 in the right operand text box. You can now apply any of the operators to the values in the text boxes. 5. Click the - Subtraction button and then click Calculate. The text in the Expression text box changes to 54 - 13 and the value 41 appears in the Result box as shown in the following image 6. Click the Division button and then click Calculate. The text in the Expression text box changes to 54 13 and the value 4 appears in the Result text box. In real life 54 13 is recurring but this is not real life this is C performing integer division and when you divide one integer by another integer the answer you get back is an integer as explained earlier. 7. Click the Remainder button and then click Calculate. The text in the Expression text box changes to 54 13 and the value 2 appears in the Result text box. This is because the remainder after dividing 54 by 13 is 2. 54 - 54 13 13 is 2 if you do the arithmetic rounding down to an integer at each stage my old math master at school would be horrified to be told that 54 13 13 does not equal 54 8. Test the other combinations of numbers and operators. When you have finished click Quit to return to the Visual Studio 2008 programming environment. Now take a look at the MathsOperators program code. 42 Part I Introducing Microsoft Visual C and Microsoft Visual Studio 2008 Examine the MathsOperators program code 1. Display th e form in the Design View window double-click the file in Solution Explorer . 2. On the View menu point to Other Windows and then click Document Outline. The Document Outline window appears showing the names and types of the controls on the form. If you click each of the controls on the form the name of the control is highlighted in the Document Outline window. Similarly if you select a control in the Document Outline window the corresponding control is selected in the Design View window. 3. On the form

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
172    77    2    28-04-2024
Đã 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.