Posts

Showing posts from February, 2018

C# Program to Convert Decimal Number To Octal

C# Program for Decimal To Octal Number Conversion This C# program perform the number conversion from the decimal number to the equivalent octal number.  In this program the user enters the decimal value which is stored in the deciNum variable. The value is copied to the variable quotient. Now while the value of quotient is not equals 0, store the modulo of it in the array octNum and divide the quotient by 8. Now for output display the values stored in the array octNum. Lets have a view on the code...

C# Program To Convert Decimal Number to Binary

Decimal Number To Binary Conversion This C# program performs the number conversion from decimal number to its equivalent binary number. This program will read a decimal number from the user and stores it modulo by 2 in an array a[] and divide the same number by 2 and stores in same variable 'n'. Now for the input retrieve the numbers from the array a[] and print or display it on the screen. Lets have a look on the code...

C# program to convert Decimal Number to Hexadecimal

Conversion of Decimal To Hexadecimal Number in C# This C# Program Performs decimal to Hexadecimal Conversion. This C# Program converts the given decimal number into hexadecimal.  Store the decimal value in other variable (quotients) and store its modulo in temporary variable. Now compare the value of temporary variable. If it is less than 10 add 48 to it or else add 55 to it. and at last print the result.  Here is source code of the C# Program to Perform Decimal to Hexadecimal Conversion. The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.

C# program for Currency Conversion

C# Program to Convert the Rupees Amount To other Currency Amount Today, I have shared a C# program that converts the rupees amount into equivalent Dollar, Franc and Euro amount. The amount of Dollar, Franc & Euro are changed daily. So as per your requirement you can change the amount to get the accurate result. Note:   Here I had used a goto statement to make a program in repeated mode as the user doesn't input the value for exit i.e. 4 in my case. Lets review the code...

C# program to convert Binary Number to Decimal

Conversion of Binary To Decimal Number in C# This C# Program Performs Binary to Decimal Conversion. This C# Program converts the given binary number into decimal. The program reads the binary number, does a modulo operation to get the remainder, multiples the total by base 2 and adds the modulo and repeats the steps. Here is source code of the C# Program to Perform Binary to Decimal Conversion.The C# program is successfully compiled and executed with Microsoft Visual Studio.The program output is also shown below.

Socket Programming for sharing content of file

Server-Client Program To Transfer Content Of File from Server To Client As we know that as search on any site we are treated as a Client and the the one who reply to our request is treated as Server. When we send any request to the server, it compute some program and gives the desired reply to us. Here I had posted one Client-Server program in which the content of the file is transfer from the server side to the client side. Here for the successful execution of the program we have to make 4 file in one folder namely,  Client.java: For client side coding Server.java: For server side coding Client.txt: Where the content are received from the server Server.txt: Where the content are already stored for giving response for the client request. Let take a view on the coding.

Socket Programming for sorting array

Server-Client Socket Program For Sorting Elements In this post, I had shared a program related to the socket programming in which the sorting of the elements of array can be done. In this code there should be two file namely server.java and client.java. In client.java code is created to take the size of the array and elements of array and it send to the server. In server.java the value of the size of array and elements of array is used for sorting the elements and sends back to the client. Let review the code for the above aim.