Find Us on Facebook
Follow Us on Twitter

twitter

Programs

Reverse order of strings in C#
static void Main(string[] args)
{
    char[]your_input;
    Console.WriteLine("Please Enter your Name : ");
    string s = Console.ReadLine();
    your_input = s.ToCharArray();
    Array.Reverse(name);
    Console.WriteLine(your_input);
    Console.ReadLine();
}

Console Application for creating star pyramid using C# code
static void Main(string[] args)
// Console Application for creating star pyramid using C# code
// For value of 4
//               *
//              * *
//             * * *
//            * * * *
using System;
namespace STAR
{
    class Class1
    {
        static void Main()
        {
            Console.WriteLine("Enter the value ");
            int k=int.Parse(Console.ReadLine());
            int n=k-1;
            int x=2*(k-1)+1;
            for(int p=0;p<=n;p++)
            {
                for(int j=k-1;j>=0;j--)
                {
                    Console.Write(" ");
                }
                for(int i=0;i<=(x-2*(k-1));i++)
                {
                    if(i%2==1)
                    {
                        Console.Write("*");
                    }
                    else
                    {
                        Console.Write(" ");
                    }
                }
                Console.WriteLine();
                k--;
            }
            Console.ReadLine();
        }
    }
}
  • Full RSS Feed

    Full RSS Feed

    Subscribe to our RSS Feed with full posts for your enjoyment.

  • E-Mail Delivery

    E-Mail Delivery

    We will send full blog posts to your inbox each time new posts plublished.

Increase your website traffic with Attracta.com
review http://www.bscinfotech.blogspot.com on alexa.com