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
What is .NET Remoting? The .NET remoting is replacement of DCOM. Using .NET remoting you can make remote object calls that lie on different Application Domains. since the remot

What is Reflection?  It extends the advantages of metadata by allowing developers to inspect and use it at runtime. For example, dynamically determine all the classes contained

Printing Triangles - C# Program I need program code for Printing Triangles in C#. Can anybody send me there ideas?

I need Windows 8.1 Project, Asset management slate App Project Description: We are seeking a Windows 8 app developer with PROVABLE experience to prepare a project and asset m

Which property on a Combo Box do you set with a column name, prior to setting the Data Source, to display data in the combo box? ComboBox.DataValueField = "ColumnName" When

What are the differences between ASP and ASP .Net ?  ASP: Code is Interpreted ASP.NET: Code is Compiled   ASP: Business Logic and Presentation Logic are in a one

If one of your validations is complicated and does not fit in any validators, what you do? The best way is to go for CustomValidators. The sample code for a custom validator

In which statement the LINQ query is executed? A LINQ query is executed in the For every statement in Visual Basic and in the for each statement in C#.

How to Creating a Key Pair ? You can create a key pair using the Strong Name tool (Sn.exe). Key pair files usually have an .snk extension. To create a key pair At the comman

Write a Program of Changing String Order - C# Language  using System;   class Prog3_2  {       public static void Main(String [] args)    {     Console.Write(ar