Related questions
C#(Sharp): I made my code and design below. Anybody can help me some correction and add some design button and code. "Need to make C# step by step design and code "Calculator where make a calculator program that can do add, subtract, multiply, divide and square root. It should have a memory save/restore function for one number. There should be a way to set the number of fraction digits displayed".
-
Code:
-
using System;
-
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AktCalc
{
public partial class Form1 : Form
{
string last = "";
bool minus = false;
bool plus = false;
bool divide = false;
bool multiply = false;
string memory = "";
public Form1()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
-
if (textBox1.Text.Contains(","))
{
return;
}
else
{
textBox1.Text += ",";
}
}
private void button21_Click(object sender, EventArgs e)
{
last = textBox1.Text;
multiply = true;
}
private void button3_Click(object sender, EventArgs e)
{
last = textBox1.Text;
plus = true;
}
private void button5_Click(object sender, EventArgs e)
{
last = textBox1.Text;
divide = true;
}
-
private void button4_Click(object sender, EventArgs e)
{
last = textBox1.Text;
minus = true;
}
// Equalls =
private void button6_Click(object sender, EventArgs e)
{
if (minus)
{
decimal equals1;
equals1 = Convert.ToDecimal(last) - Convert.ToDecimal(textBox1.Text);
textBox1.Text = Convert.ToString(equals1);
}
if (plus)
{
decimal equals1;
equals1 = Convert.ToDecimal(last) + Convert.ToDecimal(textBox1.Text);
textBox1.Text = Convert.ToString(equals1);
}
if (divide)
{
decimal equals1;
-
equals1 = Convert.ToDecimal(last) / Convert.ToDecimal(textBox1.Text);
textBox1.Text = Convert.ToString(equals1);
}
if (multiply)
{
decimal equals1;
equals1 = Convert.ToDecimal(last) * Convert.ToDecimal(textBox1.Text);
textBox1.Text = Convert.ToString(equals1);
}
}
private void button16_Click(object sender, EventArgs e)
{
textBox1.Text = Convert.ToString(Math.Sqrt(Convert.ToDouble(textBox1.Text)));
}
private void button1_Click(object sender, EventArgs e)
{
memory = textBox1.Text;
label1.Text = "M";
}
private void button10_Click(object sender, EventArgs e)
{
memory = "";
label1.Text = "";
}
-
private void button15_Click(object sender, EventArgs e)
{
textBox1.Text = memory;
}
private void button11_Click(object sender, EventArgs e)
{
textBox1.Text = "";
multiply = false;
plus = false;
minus = false;
divide = false;
}
private void button20_Click(object sender, EventArgs e)
{
textBox1.Text += "0";
}
private void button19_Click(object sender, EventArgs e)
{
textBox1.Text += "1";
}
private void button18_Click(object sender, EventArgs e)
{
-
textBox1.Text += "2";
}
private void button17_Click(object sender, EventArgs e)
{
textBox1.Text += "3";
}
private void button14_Click(object sender, EventArgs e)
{
textBox1.Text += "4";
}
private void button13_Click(object sender, EventArgs e)
{
textBox1.Text += "5";
}
private void button12_Click(object sender, EventArgs e)
{
textBox1.Text += "6";
}
private void button9_Click(object sender, EventArgs e)
{
textBox1.Text += "7";
}
-
private void button8_Click(object sender, EventArgs e)
{
textBox1.Text += "8";
}
}
}
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 1 images
- : Animating a Plot Problem: The MATLAB code with the initial conditions and one dimensional motion equation are given in the MProject2_Assignment1_base.m file. Modify the code to explore how to animate the plot, use functions to create plot functionarrow_forward✓ Allowed languages C Problem Statement Write a C Program that will compute for the GCD of M numbers Input Input starts with a number N and is followed by N sets of numbers (M, A1, A1,...AM). We need to compute for the GCD of A1, A2....AM Output The set of N numbers indicating the GCD of each of the inputs Limits 1arrow_forwardC PROGRAM Create a c program that will convert number figures into words 1. You can use user-defined functions, string, array, and loops 2. Maximum input limit is 10000.00 Sample output (bold letters is for input) Enter amount in Peso: 143.50 You just entered P145.50 equivalent to One Hundred Forty Three and Fifty Centavos. Do you want to convert another amount? [Y|N]: Narrow_forwardInstruction: It should be a C++ PROGRAM INCLUDE THE HEADER FILE, MAIN CPP, AND BSTREE.CPP There is a real program developed by a computer company that reads a report ( running text ) and issues warnings on style and partially corrects bad style. You are to write a simplified version of this program with the following features: Statistics A statistical summary with the following information: Total number of words in the report Number of unique words Number of unique words of more than three letters Average word length Average sentence length An index (alphabetical listing) of all the unique words (see next page for a specific format) Style Warnings Issue a warning in the following cases: Word used too often: list each unique word of more than three letters if its usage is more than 5% of the total number of words of more than three letters Sentence length : write a warning message if the average sentence length is greater than 10 Word length : write a warning message if the...arrow_forwardcan somone help me with this in c languagearrow_forwardMemory Management Programming Assignment Please if this can be coded in Java or C++ i would appreciate implement and test the GET-MEMORY algorithm This algorithm uses the Next-Fit(First-Fit-With-A-Roving-Pointer) technique. implement and test the FREE-MOMORY algorithm Implement the "GET_MEMORY" and "FREE_MEMORY" algorithms. Comprehensive testing must be done for each algorithm. Following are sample run results for each: GET_MEMORY IS RUNNING......... Initial FSB list FSB# Location Size 1 7 4 2 14 10 3 30 20 . . . . . . Rover is 14 ---------------------------------------------------------------------------- Allocation request for 5 words Allocation was successful Allocation was in location 14 FSB# Location Size 1 7 4 2 19 5 3 30 20 . . . . . . Rover is 30 ---------------------------------------------------------------------------- Allocation request for 150 words Allocation was not successful . . . __________________________________________________________ FREE_MEMORY...arrow_forwardC++ program Write a program that will predict the size of a population of organisms. The program should ask the user for the starting number of organisms, their average daily population increase (as a percentage of current population), and the number of days they will multiply. A loop should display the size of the population for each day.arrow_forwardInstructions The python "try" keyword is very powerful in that it can, among other things, prevent a program from ending abnormally because of invalid numeric input. Write a python program with two functions/modules that does the following: .main() accepts input and calls a function to test if the input is a number and displays a message regarding the result of that numeric test • numTest() is passed an input string, tests to see if the string is numeric and returns the necessary information to main() . a NULL input (just pressing the enter key) ends the program . DO NOT USE THE BUILTIN PYTHON FUNCTION FOR NUMERIC TESTING Be sure to use clear prompts/labeling for input and output.arrow_forwardProblem Statement The barcode used by the U.S. Postal System to route mail is defined as follows: Each decimal digit in the ZIP code is encoded using a sequence of three half-height and two full-height bars. The barcode starts and ends with a full-height bar (the guard rail) and includes a checksum digit (after the five-digit ZIP code or ZIP + 4), computed by summing up the original digits modulo 10. Define the following functions: Draw a half-height or full-height bar on stddraw. Given a digit, draw its sequence of bars. Compute the checksum digit. Also define global code that read in a five- (or nine-) digit ZIP code as the command-line argument and draws the corresponding postal barcode.arrow_forwardProgramming Language: C++ I really need help with this question and I keep getting repost answers. Please, someone, help with a genuine understanding of the problem. Code two functions to fill an array with the names of every World Series-winning team from 1903 to 2020, then output each World Series winner with the number of times the team won the championship as well as the years they won them. The input file is attached, along with the main function and screenprint. Please note team names that include two words, such as Red Sox, have an underscore in place of the space. This enables you to use the extraction operator with a single string variable. The following resources are included: Here is main. #include <iostream>#include <fstream>#include<string> using namespace std; // Add function declarations and documentation here void fill(string teams[], int size);void findWinner(string teams[], int size); int main(){ const int SIZE = 118;int lastIndex;string team[SIZE];...arrow_forwardCourse: Assembly Language: You have to write the code with proper instructions of Question and send the error free . Dont copy paste from any website create by expert with proper question conditions: Question: Write a program that prompts the user to enter two numbers in the form of characters between (0-9). Assume first number is greater than second number. Convert the number in characters to numbers in digits and subtract them. The display the answer after converting it into number character with proper message. Out put should must be like sample. Sample program output is given below: Enter the first number: 5 Enter the second number: 3 The result of subtraction : 2arrow_forwardAssignment #2 Instructions: Through this programming assignment, the students will learn to do the following: Learn to work with command line options and arguments Gain more experience with Makefiles Gain more experience with Unix Learn to use some of the available math functions available with C Usage: mortgagepmt [-s] -r rate [-d downpayment] price In this assignment, you are asked to perform a mortgage payment calculation. All information needed for this will be passed to the program on the command line. There will be no user input during the execution of the program You will need a few pieces of information. The price of the home and the amount of the down payment. You will also need to know the interest rate and the term of the mortgage. To figure your mortgage payment, start by converting your annual interest rate to a monthly interest rate by dividing by 12. Next, add 1 to the monthly rate. Third, multiply the number of years in the term of the mortgage by 12 to calculate the...arrow_forwardarrow_back_iosarrow_forward_ios
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education