Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need question 6 pls 1. (20p) What does the following program output? 5.40p]A barcode scanner for Universal Product Codes Explain where is the output

image text in transcribed I need question 6 pls

1. (20p) What does the following program output? 5.40p]A barcode scanner for Universal Product Codes Explain where is the output coming from? Only Output (UPCs) verifies the 12-digit code scanned by comparing evenit is correct) or (only explanation even st the code's last digit (called a check digit) to its own is correct) or (wrong Explanation with correct computation of the check digit from the first 11 digits output) is zero point as follows: winclude 1. (step calculate the sum of the digits in the int pecinta, ints); int main) odd-numbered positions (the first, third, int ar 10]=(4,3,6,2,5,23,4,5,1.9): eleventh digits) and tiply this sum by int ** wear II. (step 2]Calculate the sum of the digits in the kape (, 10); even-numbered positions, the second, fourth- printf(" ",); tenth digits) and add this to the previous kape(.5); result(result of step1). printf("..",k), return 0;) III. (step 3)Ir the last digit of the result from step int pecinta, ints) 2 ise, then is the check digit. Otherwise, int 6,1 na; Subtract the last digit from 18 to calculate the check digit. for(i = 1; 15: 1++){ if((a+1)>) { "fari);} > IV. steper the check dagat matches the final return :) digit of the 12-digit UPC, the UPC is assumed correct 2- [30p]Harlan A. Brothers and John A. Knox discovered that as the value of x gets larger the value of the 1. Write main function that prompts the user to expression enter the 12 digits of a barcode. The program 2x+1 should store the digitain an integer acay. 2x-1 2. Write a "check function to calculate the check digit. and compared to the final barcode digit gets closer and closer to Write a program that If the digits matchi output the barcode with the evaluates this expression for x = 1, 2, 3, and so on message -validated. If not, output the barcode until the absolute difference between the...expressions with the sessage "error in barcode. Also, output value and the real value of "e" is less than 0.000001 with labels the results from steps 1 and 2 of the Display the value of x that causes your loop to exit check-digit calculations. Note that the first along Mith both the final approximation of and the digit of the barcode will be stored in elemento real value of Show decimal places. Leal 322102612 of the array clue: "check function takes two [Do not use math.h library. For example, if you need to argument and it doesnt return any value) calculate power of number, write your own function] 6. [30p) Write a function that determines standart deviation of float array. The function takes dataset as a 3- [10p]Write a function that displays a solid square or float array paraneter And it also return result as a w whose side is specified in integer garanter side Float (Clue: calculate average first) Definations 4-(1)-Write a program that write your name and surname 1 on the screen!! x- o standard deviation i = each value of dataset X (with a bar over 1t) = the arithmetic mean of the data (This symbol will be indicated as average of dataset) No the total number of data points (if you need square root of some number you can use sort function in math.h Library. Usage example: assort(b); which means "a" is equal to square root of "b")

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

Students also viewed these Databases questions