Input:
enter the value:1234
output:
1
2
3
4
write a program to get above output.....

Answer Posted / chandan

public static void Main()
        {
            string str = Console.ReadLine();
            foreach (var obj in str)
            {
                Console.Write(obj.ToString());
                Console.WriteLine();
            }
            Console.ReadLine();
        }

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is new keyword in oops?

601


What are the 3 pillars of oop?

626


hi all..i want to know oops concepts clearly can any1 explain??

1685


What is a class and object?

603


Give two or more real cenario of virtual function and vertual object

1863






Why it is called runtime polymorphism?

583


What is oops in simple words?

589


What is difference between abstraction and encapsulation?

598


What is polymorphism oop?

634


What is for loop and its syntax?

607


write a C++ program for booking using constructor and destructor.

2061


What is oops and why we use oops?

581


What is meant by multiple inheritance?

744


Which type does string inherit from?

623


Why do pointers exist?

671