Question
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
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
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; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started