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 type of questions

1920


What is object-oriented programming? Webopedia definition

981


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

1870


Can we define a class within the interface?

818


What does and I oop mean?

873


Why is destructor used?

784


Is oop better than procedural?

797


Can abstract class have normal methods?

827


What are the features of oop?

871


What polymorphism means?

831


What does I oop mean?

860


What is oops and why we use oops?

822


What does and I oop mean in text?

884


Is enum a class?

829


What makes a language oop?

850