A
A
Anton_repr2019-04-13 13:53:41
C++ / C#
Anton_repr, 2019-04-13 13:53:41

How to write the results of functions one by one?

The question is worded not quite correctly, but I ask for help.
private void carbonFiberButton11_Click_1(object sender, EventArgs e)
{
textBox1.Text = bina() + Encrypt();
}
Textbox1 displays the results of two functions.
Imagine that bina() outputs "abcwhere" and Encrypt() outputs "12345". I need to display them at the same time, but the entry should look like this: "a1b2c3g4d5e" - it should alternate. I don't quite understand what needs to be done.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Gaydak, 2019-04-13
@Anton_repr

What should be done??
It's just that you need to write another function that will output in the desired format))
if the "string length" is the same in bina() and Encrypt(), then rewrite it so that they output one character each, depending on the input parameter. something like

string result;
for(int i=0;i<SomeCount();i++)
{
result +=bina(i) + Encrypt(i)
}
textBox1.Text = result;

it's such a general principle. but in general the wording and formulation of the question is disgusting, which means that the understanding of the task is lame ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question