60 576
Assignments Done
97,9%
Successfully Done
In April 2018

Answer to Question #13975 in C# for Sifsilva

Question #13975
Write an application that will accept two decimal values in textboxes and calculate the sum and the quotient.When button Calculate1 is clicked • The two numbers are stored in variables • Call one method Calculate to perform calculations • Display results on labels Methods.Method Calculator uses call-by-value and call-by-reference(Ref) parameters to return thevalues.
Expert's answer
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Quotient
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void btnCalculate_Click(object sender, EventArgs e)
{

int result;
int sum;
sum=int.Parse(txtFirst.Text)+int.Parse(txtSecond.Text);
int quotient = Math.DivRem(int.Parse(txtFirst.Text), int.Parse(txtSecond.Text), out
result);
lblResult.Text ="Quotient= "+quotient.ToString() + " " + result.ToString() + " Sum= " + sum.ToString();
}


}
}


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions