PFC - Workshop 2Question 1: Input and check ISBN number.ISBNThis probl translation - PFC - Workshop 2Question 1: Input and check ISBN number.ISBNThis probl Vietnamese how to say

PFC - Workshop 2Question 1: Input a

PFC - Workshop 2
Question 1: Input and check ISBN number.
ISBN
This problem is slightly more difficult than the above problem. This one requires a data type that stores 10 digits.
Background
Publishers and bookstores use a number system called the International Standard Book Number (ISBN) system to identify books. At the start of publication, each book is assigned a unique ISBN. An ISBN, once assigned, can never be re-used. Click here for detailed information on this numbering system.
An ISBN consists of exactly 10 digits. The rightmost digit is the check digit. The check digit is validated modulo 11.
• multiply each digit from the first to the ninth by a weight from 10 to 2 respectively (the first digit by 10, the second by 9,..., the ninth by 2).
• the sum of the products plus the check digit should be divisible without remainder by 11.
• if there is a remainder, the whole number is not a valid ISBN.
Consider the following example:

ISBN 0003194876
|
check digit is 6
add first set of alternates to themselves
0 0 0 3 1 9 4 8 7
10 9 8 7 6 5 4 3 2
0 0 0 21 6 45 16 24 14 = 126
add check digit 6
total 132
divide by 11 12
remainder 0
Therefore this ISBN is valid

Specifications
Design a program that validates an ISBN. Your program keeps accepting a whole number and determining if that whole number is a valid ISBN. Your program terminates when the user enters 0 as the whole number.
The output from your program looks something like:

ISBN Validator
==============
ISBN (0 to quit): 0003194876
This is a valid ISBN.
ISBN (0 to quit): 0003194875
This is not a valid ISBN.
ISBN (0 to quit): 0
Have a Nice Day!

The data type long only guarantees room for 9 digits. The data type long long guarantees room for an integer with well over 12 digits (at least 64 bits of precision). The conversion specifier for a long long integer is %lld. The Borland 5.5 compiler does not include the long long data type, but instead provides __int64 and %I64d instead of %lld as the conversion specifier.

Question 2: Calculate approximately ex for given x.
Suppose epsi is a constant given by preprocessor directive statement

#define epsi 0.0001

write a program which input x real (double type) number, then calculate ex approximately by the formula:
ex ~ S = 1+ + + ... +
here n is the first integer for which | |  epsi is satisfied.

Additional requirements:
Draw a flow chart on separate paper OR write pseudo-code as comment at the beginning of your programs to explain you algorithm.

0/5000
From: -
To: -
Results (Vietnamese) 1: [Copy]
Copied!
PFC - Workshop 2Question 1: Input and check ISBN number.ISBNThis problem is slightly more difficult than the above problem. This one requires a data type that stores 10 digits. BackgroundPublishers and bookstores use a number system called the International Standard Book Number (ISBN) system to identify books. At the start of publication, each book is assigned a unique ISBN. An ISBN, once assigned, can never be re-used. Click here for detailed information on this numbering system. An ISBN consists of exactly 10 digits. The rightmost digit is the check digit. The check digit is validated modulo 11. • multiply each digit from the first to the ninth by a weight from 10 to 2 respectively (the first digit by 10, the second by 9,..., the ninth by 2). • the sum of the products plus the check digit should be divisible without remainder by 11. • if there is a remainder, the whole number is not a valid ISBN. Consider the following example: ISBN 0003194876 | check digit is 6 add first set of alternates to themselves 0 0 0 3 1 9 4 8 7 10 9 8 7 6 5 4 3 2 0 0 0 21 6 45 16 24 14 = 126 add check digit 6 total 132 divide by 11 12 remainder 0 Therefore this ISBN is validSpecificationsDesign a program that validates an ISBN. Your program keeps accepting a whole number and determining if that whole number is a valid ISBN. Your program terminates when the user enters 0 as the whole number. The output from your program looks something like: ISBN Validator ============== ISBN (0 to quit): 0003194876 This is a valid ISBN. ISBN (0 to quit): 0003194875 This is not a valid ISBN. ISBN (0 to quit): 0 Have a Nice Day!The data type long only guarantees room for 9 digits. The data type long long guarantees room for an integer with well over 12 digits (at least 64 bits of precision). The conversion specifier for a long long integer is %lld. The Borland 5.5 compiler does not include the long long data type, but instead provides __int64 and %I64d instead of %lld as the conversion specifier.Question 2: Calculate approximately ex for given x.Suppose epsi is a constant given by preprocessor directive statement#define epsi 0.0001 write a program which input x real (double type) number, then calculate ex approximately by the formula: ex ~ S = 1+ + + ... + here n is the first integer for which | |  epsi is satisfied.Additional requirements:Draw a flow chart on separate paper OR write pseudo-code as comment at the beginning of your programs to explain you algorithm.
Being translated, please wait..
Results (Vietnamese) 2:[Copy]
Copied!
PFC - Hội thảo 2
Câu hỏi 1: Đầu vào và kiểm tra số ISBN.
ISBN
Vấn đề này là một chút khó khăn hơn so với các vấn đề nêu trên. Điều này đòi hỏi một loại dữ liệu mà các cửa hàng 10 chữ số.
Nền
nhà xuất bản và nhà sách sử dụng một hệ thống số gọi là hệ thống ISBN (ISBN) để xác định được sách. Khi bắt đầu công bố, mỗi cuốn sách được gán một ISBN độc đáo. ISBN, một khi được giao, có thể không bao giờ được tái sử dụng. Nhấn vào đây để biết thông tin chi tiết về hệ thống đánh số này.
Một ISBN gồm chính xác 10 chữ số. Các chữ số tận cùng bên phải là số kiểm tra. Các số kiểm tra được xác nhận modulo 11.
• nhân mỗi chữ số từ đầu tiên thứ chín của một cân 10-2 tương ứng (các chữ số đầu tiên 10, thứ hai bởi 9, ..., thứ chín bằng 2).
• sự tổng các sản phẩm cộng với số kiểm tra cần được chia không còn dư bằng 11.
• nếu có một phần còn lại, toàn bộ số lượng không phải là một ISBN hợp lệ.
Xét ví dụ sau: ISBN 0003194876 | kiểm tra chữ số là 6 thêm tập đầu tiên của dự khuyết để mình 0 0 0 3 1 9 4 8 7 10 9 8 7 6 5 4 3 2 0 0 0 21 6 45 16 24 14 = 126 add số kiểm tra 6 tổng số 132 chia cho 11 12 còn lại 0 Do đó ISBN này là hợp lệ Thông số kỹ thuật Thiết kế một chương trình mà xác nhận một ISBN. Chương trình của bạn luôn chấp nhận một số nguyên và xác định rằng nếu toàn bộ số là một ISBN hợp lệ. . Chương trình của bạn chấm dứt khi người dùng nhập vào 0 là toàn bộ số đầu ra từ chương trình của bạn trông giống như sau: ISBN Validator ============== ISBN (0 để thoát): 0003194876 Đây là một hợp lệ . ISBN ISBN (0 để thoát): 0003194875 Đây không phải là một ISBN hợp lệ. ISBN (0 để thoát): 0 Có một ngày tốt đẹp! gõ Các dữ liệu dài chỉ đảm bảo chỗ cho 9 chữ số. Các kiểu dữ liệu lâu dài đảm bảo chỗ cho một số nguyên với hơn 12 chữ số (ít nhất là 64 bit chính xác). Sự xác định chuyển đổi cho một số nguyên dài dài là% lld. Trình biên dịch Borland 5.5 không bao gồm các kiểu dữ liệu lâu dài, nhưng thay vì cung cấp __int64 và% I64d thay vì% lld như sự xác định chuyển đổi. Câu hỏi 2: Tính toán xấp xỉ cũ cho cho x. Epsi Giả sử là một hằng số được đưa ra bởi tiền xử lý câu lệnh chỉ thị # xác định epsi 0,0001 viết chương trình đầu vào x thực (kiểu double) số lượng, sau đó tính toán khoảng ex theo công thức: ex ~ S = 1+ + + ... + ở đây n là số nguyên đầu tiên mà | |  epsi là hài lòng . Yêu cầu bổ sung: Vẽ một biểu đồ trên giấy riêng biệt hoặc viết mã giả như bình luận ở đầu chương trình của bạn để giải thích bạn thuật toán.









































Being translated, please wait..
 
Other languages
The translation tool support: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese, Chinese Traditional, Corsican, Croatian, Czech, Danish, Detect language, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Odia (Oriya), Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scots Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sundanese, Swahili, Swedish, Tajik, Tamil, Tatar, Telugu, Thai, Turkish, Turkmen, Ukrainian, Urdu, Uyghur, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu, Language translation.

Copyright ©2025 I Love Translation. All reserved.

E-mail: