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


Please Help Members By Posting Answers For Below Questions

What is overloading in oops?

847


c++ program to swap the objects of two different classes

2134


What is the main purpose of inheritance law?

953


Can we override main method?

846


Why do pointers exist?

883


What does enum stand for?

875


Who invented oop?

846


What is encapsulation c#?

816


What is difference between oop and pop?

884


What is polymorphism and types?

850


What does and I oop and sksksk mean?

874


Why is abstraction needed?

764


What is oops concept with example?

772


Which type does string inherit from?

847


What are the three main types of variables?

836