Tag: control structures

Solution Q.No. 2 of problem set

/* Problem Set Q.No.2: Program that prints following series on the console up to 10 times: 1, 101, 1001, 10001, 100001, 1000001, ..... */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication6 { class Program { static void Main(string args) { string s = "1"; Console.WriteLine(s); for(int i=2; i<10; i++) {

C# examples of if-else, switch statement, nested case, nested for loop, while loop, jump statements, string arrays, array searching

C# examples of control structures, arrays, and searching ////////////// Nested IF - Else example using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Collections; namespace ConsoleApplication1 { class Program { static void Main(string args) { Console.WriteLine("Type in a string"); string input; input = Console.ReadLine(); if (input == "") { Console.WriteLine("You typed in an