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 inheritance in oop?

604


Can we create object of interface?

601


What are different oops concepts?

577


What is class in oop with example?

621


write a program to find 2^n+1 ?

1549






What is and I oop mean?

618


Why interface is used?

553


what is the drawback of classical methods in oops?

2918


What is destructor give example?

603


What is meant by oops concept?

612


What is ambiguity in inheritance?

625


What is the main feature of oop?

618


Can you explain polymorphism?

583


what is graphics

2011


Why is encapsulation used?

577