Posts

Find min and max number in a given array

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 {     class Program     {         public static void Main()         {             int number; //number             float large, small;             int[] a = new int[50];             Console.WriteLine("Enter the size of Array");             number  = Int32.Parse( Console.ReadLine());                       Console.WriteLine("Enter the array elements");             for (int i = 0; i < number; i++)             {                 a[i] = Int32.Parse(Console.ReadLi...

Like,freetext and contains operator in sql server 2008r2

Image
How to create freetext in sqlserver 2008r2 1. Chose any one of them as per your requirement :)

String programming in C#

How to Reverse a word from the sentences: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Programing {     class Program     {         static void Main(string[] args)         {             Console.WriteLine("String");             string str=Console.ReadLine();                       string[] arySource = str.Split(' ');             string strReverse = string.Empty;             int length = Convert.ToInt32(arySource.Length);             for (int i = length - 1; i >= 0; i--)             {                 strReverse = strReverse + " "  + arySource[i];          ...

sum of number in c#

Sum of number  using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Programone {     class Program     {           static void Main(string[] args)         {             int num1, sum=0, temp;             Console.WriteLine("Enter number");             num1 = int.Parse(Console.ReadLine());             while (num1 != 0)             {                 temp = num1 % 10;                 num1 = num1 / 10;                 sum = sum + temp;             }             Console.WriteLine(sum);             ...

Swap number in C#

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Programone {     class Program     {             static void Main(string[] args)         {             int num1, num2, temp;             Console.WriteLine("Enter number");             num1 = int.Parse(Console.ReadLine());             Console.WriteLine("Enter number");             num2 = int.Parse(Console.ReadLine());             temp = num1;             num1 = num2;             num2 = temp;             Console.WriteLine(num1);             Console.WriteLine(num2);             Co...

Even and odd number in c#

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Programone {     class Program     {         static void Main(string[] args)         {             int i;             Console.WriteLine("Enter number");             i = int.Parse(Console.ReadLine());             if (i % 2 == 0)             {                 Console.WriteLine("Evennumber");                 Console.ReadLine();             }             else             {                 Console.WriteLine("oddnumber");             ...

Cricket Querry in sql

Image
create table Cricket (  Country nvarchar(20) ) select * from Cricket insert into Cricket values ('India') insert into Cricket values ('Pakistan') insert into Cricket values ('Us') insert into Cricket values ('South Africa') select (A.Country +' VS '+B.country) As Matches from Cricket A inner join Cricket B on A.Country>b.Country