Mon Nov 27 2023 15:35:55 GMT+0000 (Coordinated Universal Time)
Saved by @AdomsNavicki
#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; }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments