Hi swapnil999
You can try to clear the console before Input like this:
class Program
{
static void Main(string[] args)
{
int answer, current;
string currenttranslated;
answer = 0;
do
{
Console.Write("Enter new number: ");
currenttranslated = Console.ReadLine();
Console.Clear();
current = int.Parse(currenttranslated);
answer = current + answer;
Console.Write(@"The current answer is {0}", answer);
Console.WriteLine();
}
while (true);
}
}
Also think about a possibillity to exit the program (no endless loop), maybe if a non valid number is entered? You could check with
int.TryParse
and exit the loop
happy coding
Johannes