Challenge #3
Lesson 23 of 23 in Coddy's C++ File Handling course.
Challenge
EasyWrite a program that will read input from the file input.txt, you'll be given 5 numbers, for each of those numbers calculate the number of divisors they have and write them separated with a whitespace in the output file output.txt.
Input
5 7 10 8 12
Output
2 2 4 4 6
Try it yourself
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
// Enter your code here
// DO NOT CHANGE THE CODE BELOW!
ifstream file("output.txt")
string line;
getline(file, line);
cout << line;
file.close()
}