Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To reiterate: Write a C program which determines the validation character for the following 10 character account codes. Compute the validation character by summing the

image text in transcribed

To reiterate: Write a C program which determines the validation character for the following 10 character account codes. Compute the validation character by summing the pairs, divide the sum by 26 to obtain the whole remainder. Finally, use the remainder to determine the validation character. Use the following set of test data to exercise your program and produce four column report below with appropriate alignment. The following is the code (in c) of what I have so far, but I'm not sure what I'm doing since it's only outputting the last value inputted. Welp.

#include #define getPairSum(d1,d2) (d1 - '0')*10 + (d2-'0') // programmer defined MACRO definition

int main(void)

{ char inputCode[10+1]; int sumOfPairs,sumMOD26; char validationChar;

{ int display[200], i, n ; // 10 rows printf("Enter number of credit cards you want to validate(ex: 6): "); scanf("%d", &n); for(i=0; i

//Displaying array elements {for(i=0; i

} fflush(stdin); // used to pause screen getchar(); // display for viewing return 0; }

1b-a) Identification instruments (credit cards, account numbers, etc.) are usually validated via an "encoding" scheme Write a C program which determines the validation character for the following 10 character account codes Compute the validation character by summing the pairs of the input code. Upon obtaining the sum of the pairs, divide the sum by 26 to obtain the whole remainder. Finally, use the remainder to determine the validation character.Use the following set of test data to exercise your program and produce the our column report below with appropriate alignment. Input Code 10 Digit Numeric Sum Validated Code Code Value 198 16 55553454000 5555345400 2678901300 6421819000 3317569200 1947674000 1b-a) Identification instruments (credit cards, account numbers, etc.) are usually validated via an "encoding" scheme Write a C program which determines the validation character for the following 10 character account codes Compute the validation character by summing the pairs of the input code. Upon obtaining the sum of the pairs, divide the sum by 26 to obtain the whole remainder. Finally, use the remainder to determine the validation character.Use the following set of test data to exercise your program and produce the our column report below with appropriate alignment. Input Code 10 Digit Numeric Sum Validated Code Code Value 198 16 55553454000 5555345400 2678901300 6421819000 3317569200 1947674000<>

<>

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

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions