TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
All Arithmetical Operators in C# Console Programing
Rajan Singh
May 30
2015
Code
928
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
using
System;
namespace
CSharpFundamentals
{
class
ArithmeticalOperators
{
private
static
void
Main(
string
[] args)
{
double
value1, value2;
Console.Write(
"Enter First Value: "
);
value1 = Convert.ToDouble(Console.ReadLine());
Console.Write(
"Enter Second Value: "
);
value2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine();
Console.WriteLine(
"Addition: {0} + {1} = {2}"
, value1, value2, value1+value2);
Console.WriteLine(
"Subtraction: {0} - {1} = {2}"
, value1, value2, value1-value2);
Console.WriteLine(
"Multiplication: {0} * {1} = {2}"
, value1, value2, value1*value2);
Console.WriteLine(
"Division: {0} / {1} = {2}"
, value1, value2, value1/value2);
Console.WriteLine(
"Reminder: {0} % {1} = {2}"
, value1, value2, value1%value2);
}
}
}
arithmetical Operation
C#