Profile cover photo
Profile photo
asif ghanchi
164 followers
164 followers
About
Communities and Collections
Posts

Post has attachment
**
Code: using System; using System.Collections.Generic; public class SQLScientist {     static public void Main()     {         Console.WriteLine("Input");         Console.Write("Dividend: ");         int a = Convert.ToInt32(Console.ReadLine());         Conso...
Add a comment...

Post has attachment
Check if a string has all unique characters
Code: using System; public class Test {     public static void Main()     {         string str = "Asif";         Console.WriteLine("Input: " + str);                 if(new Test().IsUniqueChar(str))         {          Console.WriteLine("Output: " + str + " h...
Add a comment...

Post has attachment
Find nth Fibonacci number
Code: using System; public class Test {     public static void Main()     {         int n = 6;         Console.WriteLine("Input: " + n);         Console.WriteLine("Output: " + n + "th Fibonacci number is " + new Test().Fibonacci(n));     }     public int Fi...
Add a comment...

Post has attachment
Print all the permutations of a string
Code: using System; public class Test {     public static void Main()     {         string str = "Asif";                  Console.WriteLine("Input: " + str);                  Console.WriteLine("Output: ");         new Test().Permutations(str,"");     }     ...
Add a comment...

Post has attachment
Check if the given number is Prime Number or not
Code: using System; public class Test {     public static void Main()     {     int n = 25;                  Console.WriteLine("Input: " + n);                  if(new Test().IsPrime(n) == true)         {         Console.WriteLine("Output: " + n + " is Prime...
Add a comment...

Post has attachment
Print all the square of 2 from 0 to n
Code: using System; public class Test {     public static void Main()     {         int n = 4;         Console.WriteLine("Input: " + n);         Console.WriteLine("Output:");                  new Test().PowerOf2(n);     }     public int PowerOf2(int n)     ...
Add a comment...

Post has attachment
Find the factorial for the given number
Code: using System; public class Test {     public static void Main()     {     int n = 4;                  Console.WriteLine("Input: " + n);          Console.WriteLine("Output: Factorial for " + n + " is " + new Test().Factorial(n));     }     public int F...
Add a comment...

Post has attachment
Find the square root of the number
Code: Method - 1: using System; public class Test {     public static void Main()     {         int n = 25;         Console.WriteLine("Input: " + n);         Console.WriteLine("Output:" + new Test().SquareRoot(n, 1, n));     }     public int SquareRoot(int ...
Add a comment...

Post has attachment
Print all the Fibonacci numbers less than value n
Code: using System; public class Test {     public static void Main()     {         int n = 13;         Console.WriteLine("Input: " + n);         Console.WriteLine("Output: ");         new Test().Fibonacci(n);     }     public void Fibonacci(int n)     {   ...
Add a comment...

Post has attachment
Print all the Fibonacci numbers from 0 to n
Code: Method - 1: using System; public class Test {     public static void Main()     {         int n = 5;         Console.WriteLine("Input: " + n);         Console.WriteLine("Output: ");         new Test().Fibonacci(n);     }     public void Fibonacci(int ...
Add a comment...
Wait while more posts are being loaded