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
Problem: (a) Explain the difference between these two lines of ASP codes: (b) The VBScript language includes some built-in functions which are often used in ASP co

How can we implement singleton pattern in .NET ? The Singleton pattern basically focuses on having one and only one instance of the object running. Lets take an e.g. a windows

Want a asp.net developer with SQL server and c# Project Description: I have a project that needs some changes to it. The project is 95% complete. It is designed on asp.net, p

What are the  steps of acquiring a proxy object in Webservice? The following steps are required to get a proxy object of a webservice at the client side:- 1.     The Clie

I want a C# Windows App Project Description: Windows App written in C# that can: Check for Internet connection Load dynamic web site If Internet connection drops rec

Briefly explain the characteristics of value-type variables that are supported in the C# programming language. The variables that are based on value types directly contain valu

Hi, I have been working on Dot Net over the past few years. I would like to do online tutoring for .NET. Could you please let me know the possible oppurtunities

What is the difference between the Take and Skip clauses? The Take clause returns a specified number of elements. For instance, you can use the Take clause to return two values

I want high skilled C++ programmers Project Description: I want to hire the developer, who are proficient in C/C++ and have experience with STL and work with the data structu

What is the use of "Must Inherit" keyword in VB.NET? If you want to create an abstract class in the VB.NET it is done by using the "MustInherit" keyword.You can't create an obj