Would try to help but picture quality is -480p
2021-12-08 18:49
The hell is even that code, sir
2021-12-08 18:50
how you manage to make one syntax error in every single line is beyond me
2021-12-08 18:51
Because you've somehow encapsulated what should be variables in quotes making it a string?
2021-12-08 18:51
thanks for reminding me that i truely hate programming
never gonna make that mistake again
2021-12-08 18:51
you should use "std::" before cin and cout
or try typing "using namespace std;" before main. in that case you don't need to always type std::
oh, and there are hell more mistakes, I think I got baited
2021-12-08 18:54
Man, use indents and brackets, this is unreadable.
2021-12-08 18:53
don't use imgur to share code, there are so much better options
github gists is just one example, even pastebin
2021-12-08 18:53
You will fail whatever class you are taking lol(unless this is just hobby ofc)
2021-12-08 18:54
there are so many mistakes, I suggest you look at a basic C++ tutorial.
You are declaring int "x,y,z..." between quotation marks, you don't need those.
Your if comparisons are wrong. x%2=0 has to be x%2==0 because you are comparing it x%2 to 0, not calculating the actual equation.
I don't remember having to put semicolons after if()'s and much much more. Seriously, look up some tutorials, there are so many mistakes.
2021-12-08 18:56
what is this code?
"S=x+y+z";
2021-12-08 18:56
For comparisons you need to write two ==, because the single = is for setting values.
Also you're closing off your comparisons immediately anyway with semicolon, it should be followed by {} brackets where to write all actions inside.
2021-12-08 18:57
bro use visual studio online compiler big shit
and you didnt do using namespace std::
2021-12-08 18:57
What even is this code? Can barely read anything, but even what I can read, there's syntax errors all over the code xD.
Also, there are many tools to share your code. Don't use imgur
2021-12-08 18:58
Most talented CSGO engineer
2021-12-08 18:58
Where the hell you studied c++?
2021-12-08 19:00
try
#include <iostream>
int main() {
std::cout << "Hello World!";
return 0;
}
2021-12-08 19:04
bossule fi atent, cand ai cin pui >> nu pui <<, cin>> si cout<< .merge si std::cout ce ai pus tu acolo cred. cand folosesti cin nu pui " " dupa, adica tu ai pus cin<<"x=5" cand defapt trebuie sa pui cin>>x si dupa ii dai tu valoarea 5 lui x din tastatura cand rulezi programu, la fel si pt celelalte
2021-12-08 19:05
I'm fluent in java and c# but what the hell is this code
2021-12-08 19:05
sorry im shit in c++ but bump
2021-12-08 19:06
maybe after int you have to remove quotes but i'm not sure. I was learning programming long time ago.
2021-12-08 19:07
never share code on an image, get proper indentation and brackets
2021-12-08 19:10
If you only had an error or two I would help, but you clearly know absolutely nothing about c++, please watch a tuturial.
2021-12-08 19:10
I clicked the topic and wanted to help but when I looked at your code I figured out that you really should get back to basics as almost every line has a syntax error. At this moment you are asking us to write it for yourself. The main question arises... are you forced to do this by someone or you are willing to learn programming?
2021-12-08 19:13
sorry frate youre beyond salvation
you should consider taking another path in ur career glhf
2021-12-08 19:15
dude use for example pastebin for code not fucking printscreens. It is like saying that Luffy is actually better than Zoro, which is obviously a logical error.
2021-12-08 19:17
just write me what you want your code to do and i'll try to do it for you
2021-12-08 19:24
0/8 you can't be this bad
2021-12-08 19:46
Wtf is this even trying to do
cin << “x=5” wtf? cin is an input stream, you need to direct the flow from the input to a variable like
int x
std::cin >> x;
Also wtf are you doing with cout.
And wtf is happening in the rest of the code too.
You need to start again from scratch bro, and I mean start learning C++ from 0.
2021-12-08 19:46
just start from scratch and watch a good tutorial
2021-12-08 19:54
eh part of me would love to learn code, im studying for a business major. IT is definitely the future so I guess I will work at IT in marketing or finance or management... I know its never too late, but I don't know where to start and even if my self learning will be applicable, maybe I will do like a bootcamp down the road
2021-12-08 20:02
Idk why you make everything into a String but you shouldn't do that in C++ unless you're gonna handle ur variables as String.
Other than that, I'm not a C++ expert, I'm more into Java and js so I can't help with syntax errors that ain't extremely obvious.
2021-12-08 20:03
bro wtf is this code? learn basic syntax of C++
if u want to help, hit me up and i will code it for u
2021-12-08 20:06
1. "x,y,z,S,P" is not of type int
2. The whole point of cin is to get user input and assign it to a variable
3. There's a big difference between = and ==, when you say S==z,y,x its returning a bool true or false, you should use = to assign
4. You shouldn't have multiple else statements like that
2021-12-08 20:15
there are kinda a lot of mistakes there but its okay since your are 9th grade you probably just started c++ very recently
line 6, 12, 16 dont put quotation marks
line 7, 8, 9 you need to read variables like cin>>x; for example. If you want to assign a variable a value just initialize it with that value like int x=0;
line 11 you need == because only one = is for assigning variables values
line 11 and 15 dont put ; right after if(), while(), for() etc
line 7, 8, 9, 13, 17, 22, 24, 25 you need to write variables like cout<<x;
in if(), while(), for() etc you need to put all of the actions in brackets { }
if you need any help pm me
2021-12-08 20:48
Go study the basics of C++, because your code doesn't makes sense
2021-12-09 19:09
its just fucked all around just strat agian broski
2021-12-09 19:21
Study some programming algorithms and more c++ basic syntax, there a tons of free courses on youtube and the only thing stopping you from learning is yourself.
2021-12-10 19:10
damn this whole code is a mistake
dm me if you still have troubles with it, I can try to help (although I'm more into Python)
2021-12-10 19:21
oh god my eyessssssssssssssssssss
2021-12-10 19:23
The code is so bad, it cannot even be a troll
2021-12-10 19:30
bro, you really should improve your style, this code is kinda hard to read. and why the fuck are you using this retarded syntax? you must've been drunk when you wrote this
2021-12-10 19:35
do you are have stupid?
Fix the way you code and it'll be simpler
2021-12-10 19:38
delete every line.
read a tutorial.
start again.
2021-12-10 19:39
did you even open the book/looked at the first part of a c++ tutorial?
2021-12-10 19:43
wtf am I looking at, that's the most disgusting C program I've ever seen
2021-12-10 20:09
I want to give you an advice. When you start a programming project, for example in your case, start only by only trying to compile :
int main () {
int "x,y,z,S,P";
return 0;
}
This will give you a compliation error because the syntax is wrong. Once you get the syntax correct, which should be
int x,y,z,S,P;
then try to move on... If you write a long text of incorrect code as a beginner, it can be difficult to spot where you went wrong.
2021-12-10 20:10
Don't use "and" use "&&", also = in C and C++ is used for declaring variables, but == is used for comparing. Eg. int a=5; if(a==b);
2021-12-10 21:22
what??? did you write your code in c++ or in english?
2021-12-10 23:36
Dude...
This code is anything except C++...
1) U need to indent your code. It helps a lot to read
2) I didnt understand what is that cin >> "x=15". U want to print this on the screen or u want to assign this value to the variable x? If is the second option, u didnt need the operator cout... Only x = 15 works fine.
3) The operator "and" in C++ is "&&" and "or" is "||"
4) The operator = is used to assign values to variables. Ex: S = x + y + z. So the variable S will recieve sum(x,y,z). The operator "==" is used to compare two values and return a bool type. Ex: (x%2 == 0). If x % 2 is equal to 0, then this statement will return true.
5) The operator cout is used to print on the screen. U only need to use cout << S, for example.
6) This program has logic problems. If any of the "ifs" conditions wasnt reached, U will compare 2 variables (S and P) with "junk" values inside of then. It will make the program do some unexpected things
2021-12-11 00:03
help him japanese ppl, i guess you are good at blurry stuff
2021-12-11 00:05
bro pls use std library :D what is std:: xd
2021-12-11 00:06
bruh just use namespace at this point
2021-12-12 04:03
long time ago, i had learn c++ . but never used real programming company.
i think objective based programming better. visual studio C# or delphi, sql server etc.
2021-12-12 13:12
#include <iostream>
using namespace std;
int main()
{
int x,y,z,S=0,P=0;
// cin>>x; cout<<x;
//cin>>y; cout<<y;
//cin>>z; cout<<z;
cout<<"X = "; cin>>x;
cout<<"Y = "; cin>>y;
cout<<"Z = "; cin>>z;
if(x%2 == 0 && y%5 == 0)
{
S = x+y+z;
cout<<"S = "<<S<<'\n';
}
if(x>0 && y>0 && z>0)
{
P=x+y+z;
cout<<"P = "<<P<<'\n';
}
else
{
cout<<"Sunt negative\n";
}
if(S>P)
{
cout<<"S>P\n";
}
else if(P>S)
{
cout<<"P>S\n";
}
else
{
cout<<"P si S sunt egale\n";
}
return 0;
}
2021-12-15 13:16
bro, learn the syntax....
2021-12-15 13:49