Answer the question
In order to leave comments, you need to log in
What is the logic between different operators?
int x = 0;
string poem = "";
while (x<4)
{
poem = poem + "a";
if (x<1){
poem = poem + "";
}
poem = poem +"n";
if (x>1) {
poem = poem + " oyster";
x= x+2;
}
if (x==1){
poem = poem + "noys";
}
if (x<1){
poem = poem + "oise";
}
x = x+1;
}
output.Text = poem;
Answer the question
In order to leave comments, you need to log in
Nikita Salnikov ,
there are numbers then the answer must be numbers
var x = 0;
var result = "";
while (x < 30) {
if(x == 0 || x == 8 || x == 15) {
result += "a";
}
if(x == 1 || x == 7) {
result += " ";
}
if(x == 2 || x == 9 || x == 10 || x == 16) {
result += "n";
}
... // и т.д.
x++;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question