Since everyone is so negative about the question, I'm going to go ahead and answer it.
We cannot be sure that OP is learning from the correct sources and, as he stated, he doesn't remember what to do next, implying that he doesn't really have an option to look it up.
The working code with some explaining comments is as follows:
#include <iostream>
#include <fstream>
using namespace std;
// Returns wether the number is odd
bool isOdd(const int num){
return num % 2 != 0;
}
int main(){
// Open the file in input mode
ifstream inputFile("data.txt");
int count(0); // Represents the current line number we are checking
string line; // Represents the characters contained in the line we are checking
// The loop goes over ever single line
while(getline(inputFile, line)){
//Increase the line count by 1
++count;
//If the line we are on is either 0 (not possible due to instant increment), 10, 20, 30, ...
if(count % 10 == 0){
//Get the number (not safe since it's not guaranteed to be a number, however it's beyond the scope of the question)
int number = stoi(line);
//Ternary statement can be replaced with a simple if/else
cout << "The number " << number << " is " << (isOdd(number) ? "odd" : "even") << '\n';
}
}
return 0;
}