Visual Logic Project - 11. Visual Logic - Project 1 Introduction This  dịch - Visual Logic Project - 11. Visual Logic - Project 1 Introduction This  Việt làm thế nào để nói

Visual Logic Project - 11. Visual L

Visual Logic Project - 1
1. Visual Logic - Project 1 Introduction This project lays the foundation for programming as a problem- solving technique. Basic concepts of input and output are covered, as well as the distinction between logic and syntax of a particular programming language. In this project you will learn that… • Variables are storage locations used for holding input and processing information. • Each variable has two components: its name and its value. • Input statements are used to get data into variables. • Expressions are value-returning code elements. • Assignment statements are used to perform calculations and store the result. • Output statements are used to display information. • Input, assignment, and output statements are sufficient to write small programs. Case Study (Grocery Checkout) This project covers input, processing, and output statements, the minimum functions necessary for a useful computer information system. After discussing these three statements, we will develop a working grocery checkout program. Our solution will input the purchase price of three items in the store. The program will determine the total price of all three items, add 6 percent sales tax, and display the resulting totals. The solution is presented later in this project. 1-1“Hello World” It is a time-honored tradition that your first program in any language be the output message ''Hello World.” We will follow suit and write a Hello World program using Visual Logic. Begin by running the Visual Logic program contained on with this text. When the program begins, you will see two flowcharting elements, Begin and End, connected by a flow-arrow. Click the left mouse button on the flow- arrow; the Flowchart Elements menu should pop up (Figure 1-1).
2. Select Output from the popup menu to add an output element to your flowchart. Then double-click on the newly added output element, opening the output dialog box. Type “Hello World'' (make sure that you include the double quotes) in the text box, and then click the OK button. Figure 1-2 shows how your flowchart should look after closing the dialog box.
3. Press F5 to run the program. The program executes, generating an output dialog box that appears with the text “Hello World'' (Figure 1-3). Congratulations! You have just written your first computer program! 1-2 Logic and Syntax A computer program is a solution to a problem, such as, how can customers view and purchase products over the Internet?” or, “How can sales representatives have immediate and accurate access to inventory data?” Each program (or solution) has two components, its algorithm and its syntax. An algorithm is the logical design used to accomplish a specific objective. Various tools for representing computing algorithms are available, the two most common being flowcharts and pseudocode. In this part of the course we will use Visual Logic, which combines the utility of flowcharts (graphical representations of algorithms) and pseudocode (a nontechnical description of an algorithm) with computer simulation. Using Visual Logic, computer algorithms may be written, saved, edited, executed, and debugged. Once an algorithm has been developed, it must be communicated in an appropriate language. To communicate actions to a computer, developers use a programming language like Visual Basic, Cs#, C++, Java, Pascal, or Cobol (among others). Syntax refers to the specific rules of a programming language. There are literally hundreds of programming languages to choose from, each with its own unique syntax. Therefore, writing a computer program involves creating a logical design to solve a problem and then implementing that design in an appropriate syntax. An information system is a combination of people and technology (computers) that collect, organize and process data to produce information. For any information system to be useful, it must do at least three things: input data into the system, process data within the system, and output resulting information from the system. For example, an online catalog information system might have input that includes the product ID for the items a customer wishes to purchase, along with the customer’s mailing address and credit card number. The processing could include referencing a database to determining the cost of each item, calculating the sales tax, computing the shipping charge based on the customer’s mailing address, and billing the customer’s credit card the appropriate amount. The output might include a customer receipt and reports for the sales department and the warehouse.
4. 1-3 Input Statements Remember that an information system must input data into the system, process data within the system, and output resulting information from the system. The first of those three tasks, inputting data into the system, is accomplished by means of an input statement. An input statement accepts data from the user and stores that data into a variable. A variable is a storage location that can be accessed and changed by developer code. A variable has a name (which does not change) and an associated data value (which may change during execution). To understand the input statement, consider the following modification to the Hello World program you just wrote. Click on the flow- arrow above the output statement and add an input element. Double-click on the input element, opening the input element dialog box. Type “Name” (without the quotes) in the variable textbox and press OK. Then double-click on the output element and change the text in the dialog box to read “Hello “ & Name (using quotes around “He1lo '' but not around Name). Your solution should now look like Figure 1-4. Run the program. You will be prompted to type a value for Name. Enter your name inside double quotes (e.g., “Dave”'). The program will then display a message box with the appropriate greetings (e.g., “Hello Dave”;
5. see Figure 1-5). Simple Programming Formats The Hello Name program uses an input statement to prompt the user for a value that is stored and then reused in an output statement. The value entered at the input prompt can be either numeric (e.g., 42 or 3.14159) or a string (e.g., “Dave'' or “Go Big Red''). Be aware that string input data must be entered within double quotes. There are some constraints with numeric data as well. Most programming languages do not allow numeric input to include symbols such as the percent symbol (%) or dollar sign ($) or even commas (,). Numeric input should consist of only digits and possibly one decimal point. You will quickly get used to using proper numeric notations for programming. Table 1-1 summarizes some common numeric notations and the correct programming format.
6. Variable Summary • Variables are storage locations used for holding data and information. • Each variable has two components: its name (which does not change) and its value (which may change during execution). • Input Statement Summary • Input statements are used to get data into variables. • In Visual Logic, the input flowchart element is a parallelagram with the keyword Input followed by the variable name. • When the input statement is executed, the user is prompted to enter a value using the keyboard. The value typed is then stored in the variable for later use. • String input must be placed inside double quotes. • Numeric input must contain only digits and possibly one decimal point. Percent symbols (%), dollar signs ($), and commas (,), among other symbols, are not allowed. • 1-4 Weekly Paycheck Program You have now written your first two computer programs, Hello World and Hello Name. Your third program will be a bit more complicated. You will now write a weekly paycheck program that accepts the hours worked and the hourly rate for an employee and the program will calculate and display the appropriate pay amount due to the employee for the current week. This weekly paycheck program will use all three basics of an information system-input, processing, and output-and will be developed in steps. The weekly paycheck program has two input variables, Hours and Rae. Start the Visual Logic System. (If it is already running, under the menu click File, then New) Click on the flow-arrow and select the input element. Repeat to add a second input element. Then double-click on each element to add the variable names Hours and Rate (Figure 1-6). The input for the weekly paycheck program is now complete.
7. 1-5 Assignment Statements The assignment statement can be used to perform a calculation and store the result. Addition ( + ), subtraction ( -), multiplication (*), and division (/) are common arithmetic operations found in almost every high- level programming language. Note that the multiplication operator is typically an asterisk (*) rather than the traditional times operator ( X ), because X could be mistaken as a variable name. To illustrate the use of the assignment statement, we return to the weekly pay- check program. You have already used two input statements to accept the data Hours and Rate. An assignment statement will be added to process that data. The required calculation is straightforward. Hours times rate produces the pay amount due. Returning to Visual Logic, click on a flow-arrow below the two input statements, and then select an assignment element from the menu. Double- click the assignment element to open the assignment edit dialog. The text box on the left is labeled Variable, and the text box on the right is labeled Expression. An expression is a value-returning code element, such as a variable or mathematical formula. Most programming languages follow this tradition of specifying the expression on the right hand side (RHS) of the assignment statement, and the variable to store the result on the left hand side (LHS) of the assignment statement. When executed, the right hand side expression is evaluated first. The result of the expression is then stored into
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
Visual Logic Project - 11. Visual Logic - Project 1 Introduction This project lays the foundation for programming as a problem- solving technique. Basic concepts of input and output are covered, as well as the distinction between logic and syntax of a particular programming language. In this project you will learn that… • Variables are storage locations used for holding input and processing information. • Each variable has two components: its name and its value. • Input statements are used to get data into variables. • Expressions are value-returning code elements. • Assignment statements are used to perform calculations and store the result. • Output statements are used to display information. • Input, assignment, and output statements are sufficient to write small programs. Case Study (Grocery Checkout) This project covers input, processing, and output statements, the minimum functions necessary for a useful computer information system. After discussing these three statements, we will develop a working grocery checkout program. Our solution will input the purchase price of three items in the store. The program will determine the total price of all three items, add 6 percent sales tax, and display the resulting totals. The solution is presented later in this project. 1-1“Hello World” It is a time-honored tradition that your first program in any language be the output message ''Hello World.” We will follow suit and write a Hello World program using Visual Logic. Begin by running the Visual Logic program contained on with this text. When the program begins, you will see two flowcharting elements, Begin and End, connected by a flow-arrow. Click the left mouse button on the flow- arrow; the Flowchart Elements menu should pop up (Figure 1-1).2. Select Output from the popup menu to add an output element to your flowchart. Then double-click on the newly added output element, opening the output dialog box. Type “Hello World'' (make sure that you include the double quotes) in the text box, and then click the OK button. Figure 1-2 shows how your flowchart should look after closing the dialog box.3. Press F5 to run the program. The program executes, generating an output dialog box that appears with the text “Hello World'' (Figure 1-3). Congratulations! You have just written your first computer program! 1-2 Logic and Syntax A computer program is a solution to a problem, such as, how can customers view and purchase products over the Internet?” or, “How can sales representatives have immediate and accurate access to inventory data?” Each program (or solution) has two components, its algorithm and its syntax. An algorithm is the logical design used to accomplish a specific objective. Various tools for representing computing algorithms are available, the two most common being flowcharts and pseudocode. In this part of the course we will use Visual Logic, which combines the utility of flowcharts (graphical representations of algorithms) and pseudocode (a nontechnical description of an algorithm) with computer simulation. Using Visual Logic, computer algorithms may be written, saved, edited, executed, and debugged. Once an algorithm has been developed, it must be communicated in an appropriate language. To communicate actions to a computer, developers use a programming language like Visual Basic, Cs#, C++, Java, Pascal, or Cobol (among others). Syntax refers to the specific rules of a programming language. There are literally hundreds of programming languages to choose from, each with its own unique syntax. Therefore, writing a computer program involves creating a logical design to solve a problem and then implementing that design in an appropriate syntax. An information system is a combination of people and technology (computers) that collect, organize and process data to produce information. For any information system to be useful, it must do at least three things: input data into the system, process data within the system, and output resulting information from the system. For example, an online catalog information system might have input that includes the product ID for the items a customer wishes to purchase, along with the customer’s mailing address and credit card number. The processing could include referencing a database to determining the cost of each item, calculating the sales tax, computing the shipping charge based on the customer’s mailing address, and billing the customer’s credit card the appropriate amount. The output might include a customer receipt and reports for the sales department and the warehouse.4. 1-3 Input Statements Remember that an information system must input data into the system, process data within the system, and output resulting information from the system. The first of those three tasks, inputting data into the system, is accomplished by means of an input statement. An input statement accepts data from the user and stores that data into a variable. A variable is a storage location that can be accessed and changed by developer code. A variable has a name (which does not change) and an associated data value (which may change during execution). To understand the input statement, consider the following modification to the Hello World program you just wrote. Click on the flow- arrow above the output statement and add an input element. Double-click on the input element, opening the input element dialog box. Type “Name” (without the quotes) in the variable textbox and press OK. Then double-click on the output element and change the text in the dialog box to read “Hello “ & Name (using quotes around “He1lo '' but not around Name). Your solution should now look like Figure 1-4. Run the program. You will be prompted to type a value for Name. Enter your name inside double quotes (e.g., “Dave”'). The program will then display a message box with the appropriate greetings (e.g., “Hello Dave”;
5. see Figure 1-5). Simple Programming Formats The Hello Name program uses an input statement to prompt the user for a value that is stored and then reused in an output statement. The value entered at the input prompt can be either numeric (e.g., 42 or 3.14159) or a string (e.g., “Dave'' or “Go Big Red''). Be aware that string input data must be entered within double quotes. There are some constraints with numeric data as well. Most programming languages do not allow numeric input to include symbols such as the percent symbol (%) or dollar sign ($) or even commas (,). Numeric input should consist of only digits and possibly one decimal point. You will quickly get used to using proper numeric notations for programming. Table 1-1 summarizes some common numeric notations and the correct programming format.
6. Variable Summary • Variables are storage locations used for holding data and information. • Each variable has two components: its name (which does not change) and its value (which may change during execution). • Input Statement Summary • Input statements are used to get data into variables. • In Visual Logic, the input flowchart element is a parallelagram with the keyword Input followed by the variable name. • When the input statement is executed, the user is prompted to enter a value using the keyboard. The value typed is then stored in the variable for later use. • String input must be placed inside double quotes. • Numeric input must contain only digits and possibly one decimal point. Percent symbols (%), dollar signs ($), and commas (,), among other symbols, are not allowed. • 1-4 Weekly Paycheck Program You have now written your first two computer programs, Hello World and Hello Name. Your third program will be a bit more complicated. You will now write a weekly paycheck program that accepts the hours worked and the hourly rate for an employee and the program will calculate and display the appropriate pay amount due to the employee for the current week. This weekly paycheck program will use all three basics of an information system-input, processing, and output-and will be developed in steps. The weekly paycheck program has two input variables, Hours and Rae. Start the Visual Logic System. (If it is already running, under the menu click File, then New) Click on the flow-arrow and select the input element. Repeat to add a second input element. Then double-click on each element to add the variable names Hours and Rate (Figure 1-6). The input for the weekly paycheck program is now complete.
7. 1-5 Assignment Statements The assignment statement can be used to perform a calculation and store the result. Addition ( + ), subtraction ( -), multiplication (*), and division (/) are common arithmetic operations found in almost every high- level programming language. Note that the multiplication operator is typically an asterisk (*) rather than the traditional times operator ( X ), because X could be mistaken as a variable name. To illustrate the use of the assignment statement, we return to the weekly pay- check program. You have already used two input statements to accept the data Hours and Rate. An assignment statement will be added to process that data. The required calculation is straightforward. Hours times rate produces the pay amount due. Returning to Visual Logic, click on a flow-arrow below the two input statements, and then select an assignment element from the menu. Double- click the assignment element to open the assignment edit dialog. The text box on the left is labeled Variable, and the text box on the right is labeled Expression. An expression is a value-returning code element, such as a variable or mathematical formula. Most programming languages follow this tradition of specifying the expression on the right hand side (RHS) of the assignment statement, and the variable to store the result on the left hand side (LHS) of the assignment statement. When executed, the right hand side expression is evaluated first. The result of the expression is then stored into
đang được dịch, vui lòng đợi..
Kết quả (Việt) 2:[Sao chép]
Sao chép!
Hình ảnh logic dự án - 1
1. trực Logic - Dự án 1 Giới thiệu dự án này đặt nền tảng cho lập trình như là một kỹ thuật giải quyết problem-. Các khái niệm cơ bản của đầu vào và đầu ra được bảo hiểm, cũng như sự phân biệt giữa logic và cú pháp của một ngôn ngữ lập trình cụ thể. Trong dự án này, bạn sẽ học được rằng ... • Biến là địa điểm lưu trữ được sử dụng để giữ đầu vào và xử lý thông tin. • Mỗi biến có hai thành phần: tên của nó và giá trị của nó. • Báo cáo đầu vào được sử dụng để có được dữ liệu vào các biến. • Biểu thức là yếu tố mã giá trị trả lại. • Câu lệnh gán được sử dụng để thực hiện tính toán và lưu kết quả. • Báo cáo kết quả sẽ được sử dụng để hiển thị thông tin. • Input, chuyển nhượng, và đầu ra báo cáo là đủ để viết một chương trình nhỏ. Case Study (Cửa hàng tạp hóa Thanh Toán) Dự án này bao gồm đầu vào, chế biến, và các báo cáo đầu ra, các chức năng tối thiểu cần thiết cho một hệ thống thông tin máy tính hữu ích. Sau khi thảo luận về những ba báo cáo, chúng tôi sẽ phát triển một chương trình kiểm tra hàng tạp hóa làm việc. Giải pháp của chúng tôi sẽ đầu vào giá mua của ba mặt hàng trong cửa hàng. Chương trình sẽ xác định tổng giá của tất cả ba mặt hàng, cộng thêm thuế doanh thu 6 phần trăm, và hiển thị tổng số kết quả. Các giải pháp được trình bày sau trong dự án này. 1-1 "Hello World" Đó là một truyền thống lâu đời rằng chương trình đầu tiên của bạn trong bất kỳ ngôn ngữ được thông báo đầu ra '' Xin chào thế giới. "Chúng tôi sẽ làm theo phù hợp và viết một chương trình Hello World sử dụng Visual Logic. Bắt đầu bằng cách chạy chương trình Visual logic chứa trên với văn bản này. Khi chương trình bắt đầu, bạn sẽ thấy hai yếu tố flowcharting, Begin và End, nối với nhau bằng một dòng chảy mũi tên. Nhấp vào nút chuột trái vào mũi tên flow-; menu Flowchart Elements nên bật lên (Hình 1-1).
2. Chọn Output từ popup menu để thêm một yếu tố đầu ra cho sơ đồ của bạn. Sau đó bấm đúp chuột vào các yếu tố đầu ra mới được bổ sung, mở hộp thoại ra. Gõ "Hello World '' (chắc chắn rằng bạn bao gồm dấu ngoặc kép) vào trong hộp văn bản, và sau đó nhấp vào nút OK. Hình 1-2 cho thấy cách sơ đồ của bạn nên xem xét sau khi đóng hộp thoại.
3. Nhấn F5 để chạy chương trình. Chương trình thực hiện, tạo ra một hộp thoại đầu ra xuất hiện với dòng chữ "Hello World '' (Hình 1-3). Xin chúc mừng! Bạn vừa viết chương trình máy tính đầu tiên của bạn! 1-2 Logic và Cú pháp Một chương trình máy tính là một giải pháp cho một vấn đề, ​​chẳng hạn như, làm thế nào khách hàng có thể xem và mua sản phẩm qua mạng Internet? "Hoặc," Làm thế nào các đại diện bán hàng có thể truy cập trực tiếp và chính xác số liệu hàng tồn kho? "Mỗi chương trình (hoặc dung dịch) có hai thành phần, thuật toán và cú pháp của nó. Một thuật toán là thiết kế logic được sử dụng để thực hiện một mục tiêu cụ thể. Các công cụ khác nhau để đại diện cho các thuật toán tính toán có sẵn, hai sơ đồ phúc phổ biến nhất và giả. Trong phần này của khóa học, chúng tôi sẽ sử dụng Visual Logic, trong đó kết hợp các tiện ích của sơ đồ (đại diện đồ họa của các thuật toán) và giả (một mô tả không kỹ thuật của một thuật toán) với các mô phỏng máy tính. Sử dụng Visual Logic, thuật toán máy tính có thể được viết, lưu, chỉnh sửa, thực thi, và sửa lỗi. Khi một thuật toán đã được phát triển, nó phải được truyền đạt bằng một ngôn ngữ thích hợp. Để giao tiếp hành động với một máy tính, các nhà phát triển sử dụng một ngôn ngữ lập trình như Visual Basic, C #, C ++, Java, Pascal, hoặc Cobol (trong số những người khác). Cú pháp đề cập đến các quy tắc cụ thể của một ngôn ngữ lập trình. Có nghĩa là hàng trăm ngôn ngữ lập trình để lựa chọn, mỗi với cú pháp độc đáo của riêng mình. Do đó, viết một chương trình máy tính liên quan đến việc tạo ra một thiết kế hợp lý để giải quyết một vấn đề và sau đó thực hiện rằng thiết kế trong một cú pháp thích hợp. Một hệ thống thông tin là một sự kết hợp của người và công nghệ (máy tính) thu thập, tổ chức và xử lý dữ liệu để sản xuất thông tin. Đối với bất kỳ hệ thống thông tin có ích, nó phải làm ít nhất ba điều: nhập dữ liệu vào hệ thống, xử lý dữ liệu trong hệ thống, và kết quả đầu ra thông tin từ hệ thống. Ví dụ, một hệ thống thông tin cửa hàng trực tuyến có thể có đầu vào bao gồm các sản phẩm ID cho các mục một khách hàng muốn mua, cùng với các địa chỉ gửi thư và số thẻ tín dụng của khách hàng. Việc xử lý có thể bao gồm một cơ sở dữ liệu tham khảo để xác định chi phí của từng hạng mục, tính thuế bán hàng, tính toán chi phí vận chuyển dựa trên địa chỉ gửi thư của khách hàng, và thanh toán thẻ tín dụng của khách hàng số tiền thích hợp. Sản lượng có thể bao gồm một biên nhận của khách hàng và báo cáo cho bộ phận bán hàng và nhà kho.
4. 1-3 cáo Input Hãy nhớ rằng một hệ thống thông tin phải nhập dữ liệu vào hệ thống, xử lý dữ liệu trong hệ thống, và kết quả đầu ra thông tin từ hệ thống. Việc đầu tiên của những người ba nhiệm vụ, nhập dữ liệu vào hệ thống, được thực hiện bằng phương tiện của một câu lệnh đầu vào. Một tuyên bố đầu vào chấp nhận dữ liệu từ người sử dụng và lưu trữ dữ liệu đó vào một biến. Một biến là một vị trí lưu trữ có thể được truy cập và thay đổi theo mã phát triển. Một biến có một tên (mà không thay đổi) và một giá trị dữ liệu liên quan (có thể thay đổi trong quá trình thực hiện). Để hiểu rõ hơn về đầu vào, hãy xem xét việc sửa đổi sau vào chương trình Hello World bạn chỉ cần viết. Bấm vào mũi tên flow- trên báo cáo kết quả đầu ra và thêm một yếu tố đầu vào. Double-click vào các yếu tố đầu vào, mở đầu vào hộp thoại phần tử. Nhập "Tên" (không có dấu ngoặc kép) trong biến textbox và nhấn OK. Sau đó bấm đúp chuột vào các yếu tố đầu ra và thay đổi văn bản trong hộp thoại để đọc "Hello" & Tên (sử dụng dấu ngoặc kép quanh "He1lo '' nhưng không xung quanh Name). Giải pháp của bạn bây giờ trông giống như Hình 1-4. Khởi động chương trình. Bạn sẽ được nhắc nhở để nhập một giá trị cho Tên. Nhập tên của bạn bên trong dấu ngoặc kép (ví dụ, "Dave" '). Chương trình sau đó sẽ hiển thị một hộp thông báo với những lời chào thích hợp (ví dụ, "Chào Dave";
5. xem hình 1-5). Lập trình đơn giản Định dạng Các chương trình Hello Tên sử dụng một tuyên bố đầu vào để nhắc nhở người dùng một giá trị được lưu trữ và sau đó tái sử dụng trong một tuyên bố sản lượng. Giá trị nhập vào tại dấu nhắc đầu vào có thể là số (ví dụ: 42 hoặc 3,14159) hoặc một chuỗi ký tự (ví dụ, "Dave '' hoặc" Go Big Red ''). Hãy nhận biết rằng dữ liệu chuỗi đầu vào phải được nhập vào trong dấu ngoặc kép. Có những khó khăn với các dữ liệu số là tốt. Hầu hết các ngôn ngữ lập trình không cho phép nhập số để bao gồm các biểu tượng như biểu tượng phần trăm (%) hoặc dấu đô la ($) hoặc thậm chí dấu phẩy (,). Đầu vào số phải chỉ gồm chữ số và có thể là một dấu thập phân. Bạn sẽ nhanh chóng có được sử dụng để sử dụng các ký hiệu số thích hợp cho lập trình. Bảng 1-1 tóm tắt một số ký hiệu số phổ biến và các định dạng lập trình chính xác.
6. Biến Tóm tắt • Biến là địa điểm lưu trữ được sử dụng để tổ chức các dữ liệu và thông tin. • Mỗi biến có hai thành phần: tên của nó (mà không thay đổi) và giá trị của nó (có thể thay đổi trong quá trình thực hiện). • Báo cáo Tóm tắt Bản Tuyên Bố Input • Input được sử dụng để có được dữ liệu vào các biến. • Trong Visual Logic, các yếu tố đầu vào sơ đồ là một parallelagram với đầu vào từ khóa theo sau là tên biến. • Khi câu lệnh đầu vào được thực hiện, người dùng sẽ được nhắc nhở để nhập một giá trị bằng cách sử dụng bàn phím. Giá trị nhập sau đó được lưu trữ trong biến để sử dụng sau. • Chuỗi đầu vào phải được đặt trong dấu ngoặc kép. • đầu vào Numeric phải chỉ chứa chữ số và có thể là một dấu thập phân. Ký hiệu phần trăm (%), hiệu đô la ($), và dấu phẩy (,), trong số những biểu tượng khác, không được phép. • 1-4 Chương trình Paycheck Weekly Bây giờ bạn đã viết đầu tiên hai chương trình máy tính của bạn, Hello World và Hello Tên. Chương trình thứ ba của bạn sẽ được một chút phức tạp hơn. Bây giờ bạn sẽ viết một chương trình tiền lương hàng tuần mà chấp nhận số giờ làm việc và mức lương giờ cho người lao động và các chương trình sẽ tính toán và hiển thị số tiền lương phù hợp do các nhân viên cho tuần hiện tại. Chương trình tiền lương hàng tuần này sẽ sử dụng tất cả ba vấn đề cơ bản của một hệ thống thông tin đầu vào, chế biến, và đầu ra và sẽ được phát triển trong các bước. Chương trình tiền lương hàng tuần có hai biến đầu vào, giờ và Rae. Khởi động hệ thống logic Visual. (Nếu nó đã được chạy, dưới menu chuột File, sau đó mới) Click vào dòng chảy mũi tên và chọn các yếu tố đầu vào. Lặp lại để thêm một yếu tố đầu vào thứ hai. Sau đó kích đúp vào từng yếu tố để thêm tên Hours biến và Rate (Hình 1-6). Các đầu vào cho chương trình lương hàng tuần đã được hoàn tất.
7. 1-5 Phân cáo Các câu lệnh gán có thể được sử dụng để thực hiện một tính toán và lưu kết quả. Ngoài ra (+), trừ (-), nhân (*), chia (/) là phép tính số học thông thường được tìm thấy trong hầu hết các ngôn ngữ lập trình cấp cao. Lưu ý rằng các toán tử nhân thường là một dấu sao (*) chứ không phải là lần điều khiển truyền thống (X), vì X có thể bị nhầm lẫn như một tên biến. Để minh họa cho việc sử dụng các câu lệnh gán, chúng tôi trở lại chương trình kiểm tra được khoản thanh toán hàng tuần. Bạn đã sử dụng hai câu đầu vào để chấp nhận các Hours dữ liệu và Rate. Một tuyên bố chuyển nhượng sẽ được bổ sung để xử lý dữ liệu đó. Các tính toán cần thiết là đơn giản. Giờ lần mức sản lượng lương do. Quay trở lại với Visual Logic, nhấp chuột vào một dòng chảy mũi tên bên dưới hai báo cáo đầu vào, và sau đó chọn một phần tử chuyển nhượng từ menu. Đúp vào các yếu tố giao để mở hộp thoại chỉnh sửa giao. Các hộp văn bản bên trái có nhãn biến, và các hộp văn bản bên phải được dán nhãn Expression. Một biểu thức là một yếu tố mã giá trị trả lại, như một công thức biến hay toán học. Hầu hết các ngôn ngữ lập trình theo truyền thống này trong việc chỉ định các biểu thức ở bên tay phải (RHS) của câu lệnh gán, và các biến để lưu trữ kết quả ở phía bên tay trái (LHS) của câu lệnh gán. Khi thực hiện, biểu hiện bên tay phải được đánh giá đầu tiên. Kết quả của biểu thức sau đó được lưu vào
đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2024 I Love Translation. All reserved.

E-mail: