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
Question: (a) Give four benefits of ASP.NET Web Controls. (b) List and explain any five properties of the ValidationSummary control. (c) Multiple Web Form controls ca

Question: (a) Give three key differences between the DetailsView and FormView controls. (b) The ASP.NET 2.0 Framework introduces the idea of validation groups. How Valida

Experienced Outlook addin (Microsoft Office) developer Project Description: About us in a nutshell: We are a young start-up that buys a refreshing product in the field of ent

How can we use .NET components in COM .NET components can't be used in straight forward way with the COM. You will require to create CCW in order to communicate COM components

What advantages have Web services over Component Object Model (COM) and Distributed Component Object Model (DCOM)? The benefits of Web services over COM and DCOM are as follow

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

What is Query String and what are their benefits and limitations? The query string is the information sent to the server appended to the end of a page URL. The benefits of u

Looking to build FIFA coins selling and buying website Project Description: I would like a website made for FIFA 14 TEAM. What this website will do is having automatically bu

help me to prepare the above charts for my online vegetable selling project

How to use ActiveX Control in .Net ? ActiveX control is a special type of COM component  that supports a User Interface. Using ActiveX Control in your .Net Project is even