Perform arithmetic operation on floating values in c#, DOT NET Programming

Assignment Help:

Perform Arithmetic operations on Floating Values - C# Program

Hello, I've been trying so many codes for this but those codes didn't work well. Please write the code for Perform Arithmetic Operations on Floating Values in c#.


Related Discussions:- Perform arithmetic operation on floating values in c#

In which statement the linq query is executed, In which statement the LINQ ...

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#.

What are the main components of .net framework, What are the main component...

What are the main components of .NET Framework? .NET Framework gives enormous benefits to software developers in comparison to the advantages given by other platforms. Microsof

In what instances you will declare constructor to be private, When we creat...

When we create a private constructor, we can not create object of the class directly from the client. So you will use the private constructors whenever you do not want instances of

Cookies, #question.cookies working with data.

#question.cookies working with data.

Multi-threading, What is Multi-threading? Multi-threading process forms...

What is Multi-threading? Multi-threading process forms the subset of Multi-tasking. Inspite of having to switch between programs this feature switches between different parts o

How can inheritance is achieved in vb.net?, How inheritance is achieved in ...

How inheritance is achieved in VB.NET? The Inheritance is achieved by using "Inherits" keyword in the VB.NET (& For C# it is ":"). Easy Sample is provided in CD for understandi

I need responsive database structure and web template, I have a responsive ...

I have a responsive database structure and web template. I need someone to prepare the code (.net, jquery ) to make interaction with database . Insert, edit , save . Plus a custom

Get the results of a google search query, Project Description: My needs ...

Project Description: My needs are simple; the application will: - Get the results of a Google search query (The title, URL, the description, time posted) - Apply definite

I need simple upgrades for asp.net site, I need Simple upgrades for ASP.NET...

I need Simple upgrades for ASP.NET site I have an existing web solution, we need a new page for creating additional features. The current website is done in C#.NET and ASP.NET.

Explain Add References Dialog Box, What is the difference between "using Sy...

What is the difference between "using System.Data;" and directly adding the reference from "Add References Dialog Box"? When you compiles a program using command line, u add th

Jacob

2/11/2013 6:41:58 AM

Program code for Arithmetic Operations on Floating Values

using System;

class floatdemo

{

  public static void Main()

 {  

   string s1,s2;

   float a,b;

 Console.Write("Enter no 1 # "); // Display to enter no. 1

  s1 = Console.ReadLine (); // save the  number in a string variable s1

  a = float.Parse (s1); // the string s1 is converted into float type variable

 Console.Write("Enter no 2 # "); //Display to enter no. 2

  s2 = Console.ReadLine (); // save the  number in a string variable s2

  b = float.Parse (s2); // the string s2 is cinverted into float type variable

    // Here er converted both the string variables to float because we wanted to do 

   // float / numeric manipulation with the inputted string variables

   Console.WriteLine(""); // Blank line

  Console.WriteLine("*** Integer manipulations ****");

  Console.WriteLine(""); // Blank line    

   // Integer manipulations  

  Console.WriteLine("No1 + No2 = " + (a+b));

  Console.WriteLine("No1 - No2 = " + (a-b));

  Console.WriteLine("No1 / No2 = " + (a/b));

  Console.WriteLine("No1 * No2 = " + (a*b));

  Console.WriteLine("No1 % No2 = " + (a%b));

 Console.ReadLine();

  }

}

Bella

2/11/2013 6:43:18 AM

Thanks for your Experts suggestion.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd