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); 



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
Project Description: We are looking for same usability/options of thus, we will have different own UI design. Conditions: State your price and please describe/

Can you explain how the ASP.NET authentication process works?   The ASP.NET does not run by itself, it runs inside the process of the IIS. So there are 2  authentication layer

What is an IL? Intermediate Language is also called as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code is compiled to IL. IL

Experienced Microsoft .NET web developer The developer must be reliable as well as most of all use best practices for coding as well as application design. a) .NET 3.5 (ideal

What are wait handles? The Wait handles sends signals of a thread status from one thread to another thread. There are 3 kind of wait modes:- A)WaitOne. B)WaitAny. C)Wa

Develop Nesting software with unit costing for gasket manufacturing Project Description: Our current gasket costing software is old and antiquated and has limited use interna

What is CodeDom The "CodeDom" is an object model that represents actually a source code. It is designed for language independent - once you create a "CodeDom" hierarchy for a p

About us in a nutshell: We are a young start-up that trade a refreshing product in the field of enterprise software and develops with the latest technologies. We love to partner wi

Need code for Windows 8 and Windows Phone 8 that will http post images to a php file on web server. Project Description: I am working on two projects on both Windows 8/RT and

What is BCP utility in SQL SERVER? The Bulk Copy Program (BCP) is a command line utility by which you can import & export large amounts of data in and out of the SQL SERVER dat