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 inheritance in oop?
Can we create object of interface?
What are different oops concepts?
What is class in oop with example?
write a program to find 2^n+1 ?
What is and I oop mean?
Why interface is used?
what is the drawback of classical methods in oops?
What is destructor give example?
What is meant by oops concept?
What is ambiguity in inheritance?
What is the main feature of oop?
Can you explain polymorphism?
what is graphics
Why is encapsulation used?