Perform arithmetic operations - c# program, DOT NET Programming

Assignment Help:

Perform Arithmetic Operations - c# Program

Hello, i didn't find the correct way of using arithmetic operations in c#. I am beginner for this language. Please suggest me some examples.


Related Discussions:- Perform arithmetic operations - c# program

Simple fb integration in ms-sql and asp.net, Simple FB Integration in MS-SQ...

Simple FB Integration in MS-SQL and ASP.NET I am seeking urgent project to be done, please I am interested in someone who will present demo for retrieving personal informatio

Perform arithmetic operation on floating values in c#, Perform Arithmetic o...

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 Perfor

We need asp.net expert with simple html, We need Asp.net expert with simple...

We need Asp.net expert with simple html I am in search of a long term asp.net developer to build as well as maintain a volleyball player management website. We would like to inc

Newly designed apk file for xbmc on an android tv box, Newly designed APK f...

Newly designed APK file for XBMC on an Android TV Box Project Description: We are seeking someone to have knowledge in Android's operating platform. We are a business that ma

Create custom controls in asp.net, How can we create custom controls in ASP...

How can we create custom controls in ASP.NET? The User controls are created using .ASCX in ASP.NET. After that .ASCX file is created you need two things in order to that the AS

A super-hero sharepoint developer with great design skills, A Super-hero Sh...

A Super-hero Sharepoint developer with great design skills Project Description: US: Our start-up company develops a very cool and innovative SharePoint related product with c

Uml, What is UML? The Unified Modeling Language (UML) is a graphical la...

What is UML? The Unified Modeling Language (UML) is a graphical language for documenting, specifying, visualizing,  constructing, and  the artifacts of a software-intensive sys

I need kinect fitting room - smart fitting mirror, I need Kinect Fitting Ro...

I need Kinect Fitting Room - Smart Fitting Mirror I'm presently looking for someone able to create software exactly like this fitnect (Kinect Fitting Room). Software can work

Asp.net mvc 4 setup project, I am seeking someone (person or company) who a...

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

2/11/2013 6:30:30 AM

Hey this a very easy code for your problem try this.

Perform Arithmetic Operations

using System;  

class integerdemo {

  public static void Main()

 {  

   string s1,s2;

   int a,b;  

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

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

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

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

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

  b = int.Parse (s2);                     // the string s2 is converted into int type variable

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

   // integer / 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();  

 }

}

Edward

2/11/2013 6:32:27 AM

Thanks it was very useful. I was?looking for this. Everything is ok and cleared.

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