Input:
enter the value:1234
output:
1
2
3
4
write a program to get above output.....
Answer Posted / arunbabu.k
static void Main(string[] args)
{
Console.WriteLine("Enter text/numbers");
string str1=Console.ReadLine();
char[] ch_str = new char[str1.Length];
ch_str = str1.ToCharArray();
for (int num = 0; num < str1.Length;num ++ )
{
Console.WriteLine(ch_str [num]);
}
Console.Read();
}
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
What is overloading in oops?
c++ program to swap the objects of two different classes
What is the main purpose of inheritance law?
Can we override main method?
Why do pointers exist?
What does enum stand for?
Who invented oop?
What is encapsulation c#?
What is difference between oop and pop?
What is polymorphism and types?
What does and I oop and sksksk mean?
Why is abstraction needed?
What is oops concept with example?
Which type does string inherit from?
What are the three main types of variables?