Answer the question
In order to leave comments, you need to log in
Why is the problem not correct?
Hello. I do tasks on this resource. And in the section Cyclic constructions I do a task:
After declaring the inputString variable, write a loop with a postcondition to output to the console, on a new line, the prompt "Enter a word that is 7 characters long" until the entered inputString is actually 7 characters long.
string inputString = "";
do
{
Console.WriteLine("Введите слово длиной в 7 символов:");
inputString = Console.ReadLine();
} while (inputString.Length != 7);
Answer the question
In order to leave comments, you need to log in
Your code is working correctly. Perhaps there is a code verification error on the resource.
Generally speaking, it looks right. Unless, when entering, an end-of-line character is added and when a word of 7 letters is entered, the total number of characters is greater.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question