Mon Nov 27 2023 15:13:56 GMT+0000 (Coordinated Universal Time)
Saved by @AdomsNavicki
#include <fstream> #include <iostream> using namespace std; int main() { ifstream df ("U1.txt"); ofstream rf ("U1rez.txt"); int a,n; df >> a >> n; int suma=0; for (int i = a; i <= n; i++) { suma=suma + i; } rf<<suma; df.close(); rf.close(); return 0; }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments