Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
408 B
1
Indexable
Never
//задача номер 0 (функции)
#include <iostream>
using namespace std;

string  greeting(string y){
    cout << y;
    return y;
}

string farewell(string x){
    cout << x;
    return x;
}

int main()
{
    string x = "Hello.";
    string y = "Bye.";
    bool b;
    cin >> b;
    if (b == 0){
        greeting(y);
    }
    if (b != 0){
        farewell(x);
    }
}
Leave a Comment