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 - hội thảo 2Câu hỏi 1: Nhập và kiểm tra số ISBN.ISBNVấn đề này là một chút khó khăn hơn vấn đề trên. Điều này đòi hỏi một loại dữ liệu mua sắm 10 chữ số. NềnNhà xuất bản và nhà sách sử dụng một số hệ thống gọi là hệ thống số sách chuẩn quốc tế (ISBN) để xác định các sách. Khi bắt đầu công bố, mỗi cuốn sách được phân công một ISBN duy nhất. ISBN, một khi được chỉ định, không bao giờ có thể được sử dụng lại. Click vào đây để biết thông tin chi tiết về điều này hệ thống đánh số. ISBN bao gồm chính xác 10 chữ số. Các chữ số bìa phải là số kiểm tra. Số kiểm tra được xác nhận theo modulo 11. • nhân mỗi chữ số từ đầu tiên để thứ chín của một trọng lượng từ 10 đến 2 tương ứng (chữ số đầu tiên 10, thứ hai bởi 9,..., thứ chín 2). • tổng của các sản phẩm cộng với số kiểm tra nên được chia hết cho mà không có thời gian còn lại của 11. • Nếu có một phần còn lại, số nguyên không phải là một ISBN hợp lệ. Hãy xem xét ví dụ sau: ISBN 0003194876 | kiểm tra chữ số 6 Thêm đầu tiên tập hợp các địa chỉ thay thế cho chính 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 Thêm số kiểm tra 6 Tất cả 132 chia cho 11 12 còn lại 0 Do đó này ISBN là hợp lệThông số kỹ thuậtThiết kế một chương trình xác nhận ISBN. Chương trình của bạn sẽ giúp việc chấp nhận một số nguyên và xác định nếu đó số nguyên là một ISBN hợp lệ. Chương trình của bạn kết thúc khi người dùng nhập 0 là số nguyên. Đầu ra từ chương trình của bạn trông giống như: ISBN Validator ============== ISBN (0 để bỏ thuốc lá): 0003194876 Đây là một ISBN hợp lệ. ISBN (0 để bỏ thuốc lá): 0003194875 Đây không phải là một ISBN hợp lệ. ISBN (0 để bỏ thuốc lá): 0 Chúc một ngày vui vẻ!Kiểu dữ liệu dài chỉ đảm bảo chỗ cho 9 chữ số. Các dữ liệu nhập lâu dài đảm bảo chỗ cho một số nguyên với hơn 12 chữ số (tối thiểu 64 bit chính xác). Specifier chuyển đổi cho một số nguyên lâu dài là % lld. Trình biên dịch của Borland 5.5 không bao gồm các loại dữ liệu lâu dài, nhưng thay vào đó cung cấp __int64 và % I64d thay vì lld % như specifier chuyển đổi.Câu hỏi 2: Tính toán xấp xỉ cũ nhất cho x.Giả sử epsi là một hằng số được đưa ra bởi preprocessor tuyên bố chỉ thị#define epsi 0,0001 viết một chương trình đầu vào x thực (đôi loại) số, sau đó tính toán ví dụ xấp xỉ bằng 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ẽ biểu đồ dòng chảy trên giấy riêng biệt hoặc viết mã giả như bình luận đầu của chương trình của bạn để giải thích cho 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: