Preview:
#include <fstream>
#include <iostream>

using namespace std;

int main() 
{
    ifstream df("U1.txt");
    if(df.fail()) cout<<"Nera failo!";
    else {
        int n;
        df>>n;
        int kiek=0;
        for(int d=1; d<=n; d++)
        {
            if(n % d==0) kiek++;   
            }
            ofstream rf("U1rez.txt");
            rf<<kiek;
            rf.close();
    }
    

return 0;
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter