Jump to content

Can someone here help me with a homework on coding? I need some help, im trying to create a calculator but im kinda stuck... Help pls!!!

Nazilad

Pls I need help fast. It's an easy project, im just stuck on one part. 

Link to comment
Share on other sites

Link to post
Share on other sites

what are you stuck on?

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to comment
Share on other sites

Link to post
Share on other sites

Lol nobody can help you if you don't say what you need help with xD

NEW PC build: Blank Heaven   minimalist white and black PC     Old S340 build log "White Heaven"        The "LIGHTCANON" flashlight build log        Project AntiRoll (prototype)        Custom speaker project

Spoiler

Ryzen 3950X | AMD Vega Frontier Edition | ASUS X570 Pro WS | Corsair Vengeance LPX 64GB | NZXT H500 | Seasonic Prime Fanless TX-700 | Custom loop | Coolermaster SK630 White | Logitech MX Master 2S | Samsung 980 Pro 1TB + 970 Pro 512GB | Samsung 58" 4k TV | Scarlett 2i4 | 2x AT2020

 

Link to comment
Share on other sites

Link to post
Share on other sites

Creating a calculator on this coding website called Scratch. Can't figure out why it wont work? I thought I was already finished. I would HUGELY appreciate if you could take a peek to it? It'll be simple for you, it's just complicated for me, a noob.

Link to comment
Share on other sites

Link to post
Share on other sites

this is an example of what I coded for adding, subtracting, multiplying and dividing

sscode2.png

Link to comment
Share on other sites

Link to post
Share on other sites

What language are you using and what functionality do you need? Here's a minimal quick example in Java

int num1=2, num2=5; //Set initial numbers
char mathOperation = '+' //Assign operation
if(mathOperation=='+') //Check that the operation is addition
	int result = num1 + num2; //Add the numbers
//Other operations here
return result; //Return the result to whatever method called this

 

My main computer:

i7 6700k || GTX 1070 || Asus Z170 RGB || C.M. Hyper 212 EVO || 16GB RAM || 256GB NVMe SSD || 500GB SATA SSD || 12TB total HDD || Define R5 Blackout || 850W PSU

More Details Below :) 

Spoiler

 

CPU: Intel Core i7 6700k                             GPU:  EVGA GTX 1070 FTW                                  |  Motherboard: Asus Z170 Pro Gaming Aura
CPU Cooler: C.M. Hyper 212 EVO             RAM: 16GB Kingston Fury 4x4 DDR4 2400MHz         SSD:  Intel 256GB NVMe SSD & Plextor 500GB SATA SSD

Hard Drive:  WD 2TB Black, 2TB WD Blue, 8TB WD Red     Case:  Fractal Design Define R5 Blackout Edition   PSU:  Be Quiet! Dark Power Pro 11 850W

 

Additional Computer Parts: NZXT Hue for LEDs

Peripherals: Dell U2414H (x2) || Corsair Sabre RGB || Corsair K95 Platinum || Sennheiser 558's || Modmic

 

Pictures of setup:

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

It's this code learning language called Scratch

 

Link to comment
Share on other sites

Link to post
Share on other sites

The problem is I cant get the number I select to be chosen as (number1). If you know what I mean?

Link to comment
Share on other sites

Link to post
Share on other sites

Example of what I use to try and "insert" the numbers into calculator. I think the problem is here

sscode3.png

Link to comment
Share on other sites

Link to post
Share on other sites

You still haven't said exactly what your problem is. Is it not displaying the correct things? Is it not calculating correctly? 

Be as specific as possible when answering. 

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Nazilad said:

this is an example of what I coded for adding, subtracting, multiplying and dividing

sscode2.png

Your doing calc = multi but you aren't setting calc to anything.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×