Documents

C# Imp Programes

Description
c# programe
Categories
Published
of 18
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  Practical: Using C# Programming Constructs 1. Write a program diamond shape in c# 2.Calculating Square Roots with Improved Accuracy .3.Converting Integer Numeric ata to !inary .#ultiplying #atrices $.C% &#' (o S)' Stored *rocedure+.C% ,et All -iles In A irectory.c% / 0ow to create images thumnail control using pictureo.C% Copy -rom (et -ile (o ata(ale4.C% Reg5 6alidator17.how to calculate total days etween two dates Solutions  1.diamond shape in c#using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace star_dimand class !rogram  static oid ain$string%& args'  int i( )(n; Console.WriteLine$*+nter no ,or printing star in diamond shape*'; n - int.!arse$Console.eadLine$''; ,or $i - 1; i /- n; i00'  ,or $) - n; ) - i; )22'  Console.Write$* *'; 3 ,or $) - 1; ) /- i; )00'  Console.Write$*4*'; 3 ,or $) - 1; ) /- i; )00'  Console.Write$*4*'; 3 Console.WriteLine$'; 3   ,or $i - 1; i /- n; i00'  ,or $) - 5; ) /-i; )00'  Console.Write$* *'; 3 ,or $) - n; ) - i; )22'  Console.Write$*4*'; 3 ,or $) - n; ) - i; )22'  Console.Write$*4*'; 3 Console.WriteLine$'; 3 Console.ead6ey$'; 3 33output+nter no ,or printing star in diamond shape7 44 4444 444444 44444444 4444444444   444444444444 444444444444 4444444444 44444444 444444 4444 44 2. // Finds the integer square root of a positive numberpublic static int Isqrt(int num) { if (0 == num) { return 0 ! // void #ero divide int n = (num / 2) $ % // Initial estimate& never lo' int n% = (n $ (num / n)) / 2 'hile (n%  n) { n = n% n% = (n $ (num / n)) / 2 ! // end 'hile return n! // end Isqrt() 3.Convert Decimal To Binary In C# using System;using System.Collections.Generic;using System.Linq;using System.Text;
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks