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
help me to prepare the above charts for my online vegetable selling project

to design a grid view and edit and delete the data

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

What is shadowing? When 2 elements in a program have similar name, one of them can hide and shadow the one. Therefore in such cases the element which shadowed the main element

I am seeking someone (person or company) who already has been developing some ASP.NET MVC 4 application with the subsequent requirements (so there is no need to spend extra time to

What are the differences between AJAX and JavaScript? The differences among AJAX and JavaScript are given as follows: AJAX sends request to the server and does not wait for

Project Description: I need to get lync server 2013 fixed the issues it has hit: 1) Can't connect to it outside network, I think small firewall problem with a little issue in

What is the DataContext class and how is it related to LINQ? After you add a LINQ to SQL Classes item to a project and open the O/R Designer, the empty design surface shows an

Want Microsoft CRM Dynamics CRM 2011 or 2013 programmer Project Description: Need to do customizations in CRM itself and integrate CRM 2011 with SAP Business One and HTML web

1. What are the limitations of file based data storing techniques?