Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <sstream>
- unsigned int answering( unsigned int &m ,unsigned int &n ) {
- if (m == 0) {
- return n + 1;
- }
- if ((m > 0) && (n == 0)) {
- return answering( m - 1, 1);
- }
- if ((m > 0) && (n < 0)) {
- return answering(m - 1,answering(m, n - 1));
- }
- std::ofstream fout("D:\lab rab\2_5(j).txt");
- std::cout << "Ответ " << answering;
- fout.close();
- }
- int main() {
- setlocale(LC_ALL, "Russian");
- int m, n;
- int a[2];
- std::ifstream fin("D:\lab rab\2_5(j).txt");
- m = a[0];
- n = a[1];
- fin.close();
- answering(m, n);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement