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
How would ASP and ASP.NET apps run at the same time on the same server? Both ASP and ASP.net can be run at similar server, becuase IIS has the capability to respond/serve both

How do we assign page specific attributes? The Page attributes are specified by using the @Page directive.

Explain different types of XML Application Programming Interface (API). The following are two main parts of XML parsers: Tree-based API - Compiles an XML document into a tre

Different types of remote object creation mode in .NET There are 2 different ways in which the object can be created using Remoting :- 1)SAO (Server Activated Objects) also

What's the difference b/w Unit testing, Assembly testing and Regression testing? The Unit testing is also known as the Component testing. The Unit testing ensures that the reli

What is the difference among a toolstrip drop-down button and a toolstrip split button? The difference among a toolstrip drop-down button and a toolstrip split button is that a

Finding Maximum & Minimum Numbers - C# Program I am facing some problems in the code for Finding Maximum & Minimum Numbers. Can anybody suggest me the proper code for it.

What's the use of resource manager class? The ResourceManager class helps us to read the resource files and get the values by using key. At First you require to create the obje

I need a Custom Report - Crystal Reports Project Description: I am seeking a custom report for our syrinx hire software, all reports are made from Crystal Reports. Skills

Why do we need static methods for Post Cache substitution? The ASP.NET should be able to call this static method even when there isn't an instance of your page class available.