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 are the 3 pillars of oop?

613


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2166


What is polymorphism programming?

602


What is multilevel inheritance?

723


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6485






Is abstract thinking intelligence?

592


can we make game by using c

3419


when to use 'mutable' keyword and when to use 'const cast' in c++

1642


Can abstract class have normal methods?

610


What is cohesion in oop?

624


What is the point of polymorphism?

586


What is polymorphism in oops with example?

529


Where is pseudocode used?

563


Can a varargs method be overloaded?

617


is there any choice in opting subjects like 4 out of 7

1729