Marián
Pankaj
Rishi
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
int n;
cin>>n;
int x=0;
char bit[4];
for(int i=0;i<n;i++){
scanf("%s",&bit);
if(strcmp(bit,"++x" == 0) || strcmp(bit,"x++" == 0) || strcmp(bit,"X++" == 0) || strcmp(bit,"++X" == 0)){
x+=1;
}
else if(strcmp(bit,"--x" == 0) || strcmp(bit,"x--" == 0) || strcmp(bit,"X--" == 0) | strcmp(bit,"--X" == 0)){
x-=1;
}
x=x;
}
cout<<x;
return 0;
}
this works on devc++ but gives error on codeforces. Problem 282A
If some form of libc++ is supported, then using #include<cstring> instead of #include<string.h> should work.
Ибраги́м
https://www.youtube.com/watch?v=jZ2pXlcDGFc
Ибраги́м
May your team mates never boycott you like Compiler vendors boycotted this feature.
محمود
#include <iostream>
using namespace std;
void fun (int x, int y)
}
x=20;
y = 10;
{
int main()
}
int x=10;
fun(x,x);
cout<<x;
return 0;
{
محمود
?
محمود
Is that true or false
Ибраги́м
True
Ибраги́м
Ибраги́м
Dima
محمود
What is the output
Ибраги́м
محمود
Ибраги́м
Ибраги́м
U didn't even take a look at what u wrote
Ибраги́м
Please check the code is not readable
Anonymous
Hello. Could you tell me which libraries I should know to be a good specialist?
محمود
Sharique
Zigzag
std::move dont work with uint64_t in Class Constructor?
Bcs my Clang-tidy saying about it/
Zigzag
Its anything be copyed?
Dima
lol
Zigzag
I cant sent link on screenshot
TLT
Hello,ıf ı want to start computer programming from where ı must start to this
Diego
Probably not from C
Diego
What worked for me was to start from a dynamically typed, procedural programming language
These usually are scripting languages
Diego
Check out Lua and ZeroBrane Studio, once you feel you get the hang of it, try making a game or two with LOVE2D
Diego
THEN you can start working out with languages like C#, C, C++, etc.
But that's just me, you can do whatever you feel like
Anonymous
Ever scripted a game, or program a VCR or DVR, or...
Anonymous
Most programmers don't use much math day-to-day, but it would help to be mathematically educated... Not a strict requirement.
Anonymous
I don't think they want to respond...
Diego
yyeaahh
Muhammad
anyone have a simple c programming that works better
Diego
a what
AmR
neb
Muhammad
c programming
neb
c programming
https://en.wikipedia.org/wiki/The_C_Programming_Language
neb
THIS is K&R
Stanislav
spartak
Can you advice to me the book for beginners c++
Bottom G
Bottom G
👍
Anonymous
Danyar
hello guys
Danyar
i have an assigment of c++ can you help me please
Ferit
Hi
Ferit
Can you help me this question:
As an argument, write a function that will return the number of bytes of data (file length) in the file that is named.
Anonymous
Anonymous
Hey, I have a question
Anonymous
I have a string like "Hey my name is NAME "
Anonymous
Before the name I have x numbers of space, that could vary from 0 to X
How do I create a scanf format string to say "Read 0 or more spaces?"
I know how to say "Read 1 or more", but not 0
Al
you may be able to tokenize
Al
hardly scanf will solve this
Al
check strtkn function
Al
spaces are just common chars, what do you want to format? the way I see things i dont think thats a possibility... but if you find a way pls share here so i can learn
Anonymous
Help
klimi
Help
line 18 you are missing semicolon
Anonymous
Hi, how can I insert the % character in a string?
Alex
Anonymous
+
guys, I want to use QtConcurrent run in a memeber function of my main qt class
but i dont know why, every time its give me tons of error
what can i do?
ʙᴀнᴀᴘᴀм
Should I learn first C or C++?
Anonymous
How can I use the sleep() function in milliseconds in C
o
usleep
Alex
o
Anonymous
Bottom G
Where can I read more about hooks?
Igor🇺🇦
o