Untitled

 avatar
unknown
c_cpp
a year ago
521 B
5
Indexable
#include <fstream>
#include <iostream>
#include <vector>

bool endsWith( const int number, const std::vector< int >& digits )
{
    int lastDigit = number % 10;

    for( const auto& digit : digits )
    {
        if( lastDigit == digit )
        {
            return true;
        }
    }
    
    return false;
}

int main()
{
    std::ifstream inputFile( "dane2.txt" );
    std::ofstream outputFile( "wynik2.txt" );

    std::vector< int > validEndDigits = { 0, 3, 8, 9 };

    return 0;
}
Editor is loading...
Leave a Comment