Program for assigning the values to variables, DOT NET Programming

Program for Assigning the Values to Variables

Hello i am unable to find the code of assigning the values to variables in c#. Please write a program for me of assigning  values  to  Variables in C#.

 

Posted Date: 2/11/2013 4:33:56 AM | Location : United States





Please try this once.

Program - Assigning values to variables

using System; 

class SampleMath 

  public static void Main() 

  { 

   double x = 2.0;                        // declaring a variable named x of type double & assigning it value 2.0 

   double y = 3.0;                        // declaring a variable named y of type double & assigning it value 3.0 

   double z ;                                 // declaring a variable named z of type double 

   z = x + y;  

   Console.WriteLine("x = " + x + ", y = " + y + " & z = " + z); 

   Console.ReadLine(); 

  } 

Posted by Harry | Posted Date: 2/11/2013 4:48:11 AM

Hi. Thank you for this example. I look forward to going through your other program codes. I''ve been trying to look up this kind of stuff on the? web and its a pain. Thank you for your expert Advice.

Posted by Jack | Posted Date: 2/11/2013 4:52:22 AM


Related Discussions:- Program for assigning the values to variables, Assignment Help, Ask Question on Program for assigning the values to variables, Get Answer, Expert's Help, Program for assigning the values to variables Discussions

Write discussion on Program for assigning the values to variables
Your posts are moderated
Related Questions
Virtual Webcam effects + Sourcecode + Setup + Nice User Interface Project Description: i want a similar webcam effects application which can apply effects to webcam feed. So

how to create log in form using vb 2010

I need C# AAC sound receiver over WCF Project Description: I want a WCF method which is able to receive a byte stream of an AAC sound file from iPhone device and save it on t

What is a DataReader object? The DataReader object helps in retrieving the data from a database in a forward-only, read-only mode. The base class for all the DataReader objects

URGENTLY WANTED a Web Developer (with solid .NET skills) We are immediately in search of a creative passionate and highly organised expert Web Developer to join our team to work

What are benefits & Limitation of  Hidden fields? The benefits of using Hidden fields are as shown below :- 1)    They are very simple to implement. 2)    As the data is

why datagrid are used in dot net programming langugage

Experienced Outlook addin (Microsoft Office) developer Project Description: About us in a nutshell: We are a young start-up that buys a refreshing product in the field of ent

Explain the architecture of ADO.NET in brief. AD0.NET having of two fundamental components: The DataSet, which is disconnected from the data source and does not require to k

What precautions we need to take while deploying satellite assemblies? When we distribute the assembly, the folder structure has to be very organized. The table below shows how