#include <stdio.h>
#include <stdlib.h>
int a,b,c,d,e;
int f,g,h,i,j;
int add1;
int s;
int add2;
int operation1;
int subtraction;
int Remainder;
int checkdigit;
int main()
{
`printf("Enter First Six Digits :-");`
scanf("%d %d %d %d %d %d " , &s , &a , &b, &c , &d , &e);
`printf("Enter Second Five Digits :-");`
`scanf("%d %d %d %d %d" , &f , &g , &h , &i , &j);`
`add1 = s + b + d + f + h + j ;`
`add2 = a + c + e + g + i ;`
`operation1 = ((3*add1) + add2);`
`subtraction = (operation1 - 1);`
`Remainder = subtraction%10 ;`
`checkdigit = (9 - Remainder);`
`printf("Bar code Check digit :- %d " , checkdigit);`
}
So when I try to run this program, my screen only shows the first six digits; when I put the value, I do not get the first five digits message. so where I went wrong I do not get any errors when I try to run this program.your text
arnold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.