Удалить sum.cpp

This commit is contained in:
2025-09-30 15:18:37 +03:00
parent 00296eede8
commit c5e2420500

23
sum.cpp
View File

@@ -1,23 +0,0 @@
#include <iostream>
using namespace std;
int sum(int a, int b) {
if (a > b) {
return 0;
}
return a + sum(a + 1, b);
}
int main() {
setlocale(0, "");
int a;
int b;
cout << "Введiть a: ";
cin >> a;
cout << "Введiть b: ";
cin >> b;
cout << "Сума чисел вiд " << a << " до " << b << " = " << sum(a, b) << endl;
return 0;
}