Click here to Skip to main content
15,887,930 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,
I'm just starting coding yesterday, so I am so new at this, in my mind I have an idea but I do not how to code.I've got Microsoft Visuals(c++), btw.

So I'm trying to code something very easy.--

Number 1= x
Number 2= y
Number 3= z
Number 4= q

So how can i programme something like this

(x+y+z)/q

Or something like this

(x/y)+(z/q)

If theres a tutorial, im gonna look at that.
Thank you for your attention.
(btw im sorry for my english)

What I have tried:

something very stupid
as you guest, they didnt work
Posted
Updated 17-Jun-19 1:32am
Comments
Rick York 16-Jun-19 18:45pm    
To paraphrase Mr Griff, slap a semicolon on the end and off you go. The rest of it's I/O.

Assuming you have read in the numbers:
C++
double result = (x + y + z) / q;
cout << result;
 
Share this answer
 
The above solutions is correct but to handle it you need to visit and understand some basic tutorial for Learning C++.
 
Share this answer
 
Quote:
I'm just starting coding yesterday, so I am so new at this

Advice: Don't start learning by doing personal project, it is a bad idea, you are wasting your time.
Start learning by following some tutorials completely, then start with simple personal project.
Quote:
If theres a tutorial, im gonna look at that.

Any beginner's tutorial will give the answers you need for the question, along with many other building bricks you will need very soon.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900