Input array[2] if index[0]=Index[1]



Download 30.99 Kb.
Date08.12.2019
Size30.99 Kb.
#54282
BinaryWave
INPUT ARRAY[2]

IF Index[0]=Index[1]

WRITE Index[1]

INDICES++

#include

#include

using namespace std;

int main()

{

string in;



in.resize(2);

fin.open("Input.txt", ios::in | ios:: binary);

if(fin.good())

{

fout.open("output.txt", ios::out | ios::binary);



while(!fin.eof())

{

fin >> in;



if(in[0] == in[1])

{

if (in[1] == 0xFF)



fout << '1';

else if (in[1] == 0x00)

fout << '0';

}

}



fout.close();

}

fin.close();



return 0;

}


Download 30.99 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page