#include <iostream>
#include <string>
using namespace std;
long getBarcode(long code);
//Gets the Barcode from the individual.
long verifyCode();
//verifys the code and makes the appropriate conversions.
void displayCode(long& code);
//Dislpays the barcode given by the individual.
int main()
{
long code;
displayCode(code);
return 0;
}
long getBarcode(long code)
//Gets the Barcode from the individual.
{
cout << "Enter the five digit barcode:" << endl;
cin >> code;
while(code > 99999 || code < 0)
{
cout << "Re-enter the barcode" << endl;
cin >> code;
}
return code;
}
long verifyCode()
//verifys the code and makes the appropriate conversions.
{
return 0.0;
}
void displayCode(long& code)
//Dislpays the barcode given by the individual.
{
int a, b, c, d, e, rm, rm2, rm3, rm4;
code = getBarcode(code);
a=code/10000;
rm=code%10000;
b=rm/1000;
rm2=rm%1000;
c=rm2/100;
rm3=rm2%100;
d=rm3/10;
rm4=rm3%10;
e=rm4;
/*if(a==0)
{
a='||::';
}
if(a=1)
{
a=':::||';
}
if(a=2)
{
a='::|:|';
}
if(a=3)
{
a='::||:';
}
if(a=4)
{
a=':|::|';
}
if(a=5)
{
a=':|:|:';
}
if(a=6)
{
a=':||::';
}
if(a=7)
{
a='|:::|';
}
if(a=8)
{
a='|::|:';
}
if(a=9)
{
a='|:|::;';
}
*/
cout<<a<<endl;
cout << "|"<</*a<<*/"|"<<endl;
}
asapgyritos 0 Newbie Poster
griswolf 304 Veteran Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.