c# What is the following C# code segment doing? int n = int.Parse(Console.ReadLi
ID: 3891486 • Letter: C
Question
c#
What is the following C# code segment doing?
int n = int.Parse(Console.ReadLine());
do
{
Console.Write( n%10 );
n = n/10;
} while ( n > 0 );
Console.WriteLine(" ");
finding ten percent of intervals of 10 of a number
splitting a large number into 10 parts
reversing the digits of a number, last becomes first and so on
checking how many tens are in a number
finding ten percent of intervals of 10 of a number
splitting a large number into 10 parts
reversing the digits of a number, last becomes first and so on
checking how many tens are in a number
Explanation / Answer
int n = int.Parse(Console.ReadLine());
do
{
Console.Write( n%10 );
n = n/10;
} while ( n > 0 );
Console.WriteLine(" ");
reversing the digits of a number, last becomes first and so on
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.