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#

What is the use of the connection object, What is the use of the Connection...

What is the use of the Connection object? The Connection object is used to connect your application to a specific data source by giving the needed authentication information in

Why is it preferred to not use finalize for clean up, The Problem with fina...

The Problem with finalize is that the garbage collection has to make 2  rounds in order to remove the  objects which have finalize methods. The figure below will make things cle

Answer, #queWrite a XML with database with book details (BOOK ID, Title, Au...

#queWrite a XML with database with book details (BOOK ID, Title, Author, subject, published Year, language, vendor, price)stion..

Mvc completing backend solution, ASP.NET/MSSQL/ MVC completing backend solu...

ASP.NET/MSSQL/ MVC completing backend solution + integrating with frontend. - repost Project Description: System is used for tracking company's activities through several pro

Can we post view state in another application?, You can post back to any of...

You can post back to any of the page and pages in other application, too. But if you are posting pages to other application, the PreviousPage property will return null. This is an

Difference in stored procedure and user defined function, What is the diffe...

What is the difference between Stored Procedure (SP) and User Defined Function (UDF)? Some of major differences between a stored procedure and user defined are as follows:-

How to increase sql performance?, How can you increase SQL performance? ...

How can you increase SQL performance? 1)Keep your indexes as narrow as possible. This reduces the size of the index and decrease the number of reads needed to read the index.

What is the difference between int and int32, What is the difference betwee...

What is the difference between int and int32. There is no difference among int and int32. System.Int32 is a .NET Class and int is an alias name for System.Int32.

Built a fairly standard core application skeleton, Here's the General Backg...

Here's the General Background on our project work: We need your help building out a new application that's part of a new startup in the Silicon Valley. We've built a fairly s

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