Untitled
unknown
plain_text
2 years ago
408 B
5
Indexable
//задача номер 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);
}
}Editor is loading...
Leave a Comment