Anonymous
asm
Thanks man..
Anonymous
# not a girl
Dima
also lisp is pretty easy
Dima
a recommendation for further usage: anon name looks ultra weird
Dima
Anonymous
Off really
Anonymous
Begimai
Hello. My name is Begimai. Can you help me ? I should create coding from c++. if , else should be included. But I can't do it. Because this is my first month.
Рома
#include <stdio.h> int main(void) { int n; printf("Enter the number of elements: "); scanf("%d", &n); int firstVect[100]; printf("Enter the numbers for first Vector: \n"); for (int i = 0; i < n; i++) { scanf("%d", &firstVect[i]); } printf("\n"); int secondVect[100]; printf("Enter the numbers for secnd Vector: \n"); for (int i = 0; i < n; i++) { scanf("%d", &secondVect[i]); } int isUnity = 0; for (int i = 0; i < n; i++) { if (firstVect[i] == secondVect[i]) { isUnity++; } } if (isUnity == 0) { printf("There are no unity numbers"); } else { int vect[100]; for (int i = 0; i < n; i++) { if (firstVect[i] == secondVect[i]) { vect[i] = firstVect[i]; printf("%d ", vect[i]); } } printf("\n"); for (int i = 0; i < n; i++) for (int j = i + 1; j < n;) { if (vect[i] == vect[j]) { for (int x = j; x < n; x++) { vect[x] = vect[x + 1]; } n--; } else { j++; } } for (int i = 0; i < n; i++) { printf("%d ", vect[i]); } } getch(); return 0; }
Рома
Help with the program !!! see why the program does not work.
Рома
Enter two vectors of integers from the keyboard. Create a new vector from the common elements of the two entered. The new vector should have no element repeats. Print the generated vector or display a missing element message.
klimi
Schools are doing now vector assignments hmm
Nassrullah
Anonymous
There are sites for learning c/c++ language
Anonymous
?
Javi
There are sites for learning c/c++ language
Many, it depends a lot on your level and expectations
Anonymous
İ'm beginning new
Javi
Tutorialspoint isn't bad
Anonymous
Thanks
Anonymous
Thanks
Khaleed
Hey
Avezy
There are some great Back to basics courses on the cppcon YouTube Channel right now
Anonymous
here we use push_back...can we write v[i] = i ,if yes then why do we use pushback
Anonymous
here we use push_back...can we write v[i] = i ,if yes then why do we use pushback
If you don't know the index of last element you can just use push_back(). You don't have to maintain the count of no. of elements in vector.
olli
here we use push_back...can we write v[i] = i ,if yes then why do we use pushback
push_back adds an element at the back and changes the number of elements in the vector, so it's not the same. Since your vector is empty before the first call to push_back you cannot use the [] operator
Begimai
#include <iostream> #include <math.h> using namespace std; int main() { int A,B,U,max; cout <<"Aigerim==70%"<<"\n"; cin >> A; cout <<"Beksultan==63%"<<"\n"; cin >> B; cout <<"Uulkan==91%"<<"\n"; cin >> U; if (A>B>U) { cout <<"max=="<<A; else cout <<"max=="<<B; } {else cout <<"max=="<<U; return 0; } }
Anonymous
Anonymous
Where is my problem?
i think it should be if (A>B && B>U)
Anonymous
Where is my problem?
Also the body of if condition.
Begimai
#include <iostream> using namespace std; int main() { int A,B,U; cout <<"Aigerim==70%"<<"\n"; cin >> A; cout <<"Beksultan==63%"<<"\n"; cin >> B; cout <<"Uulkan==91%"<<"\n"; cin >> U; if (A>B&&B>U) { cout <<"max=="<<A; } else { cout <<"max=="<<B; } else { cout <<"max=="<<U; } return 0; }
Anonymous
Like this ?
It won't compile
Anonymous
You have two else clauses for the same if
Pete
Droid
You have two else clauses for the same if
think it shud have a else if
Pete
These are operation overload errors correct?
Pete
Thank you
Anonymous
And read the rules
Anonymous
And read the rules
And find out which one the message violates
Pete
1. Running into many problems, slowly figuring them out. Right now I believe I am dealing with operation overloading? From the << and [ I’ve fixed the << before but never seen the [ . Im still finishing up functions and changing a few things. Also constructor, am I doing it wrong correct? 2. Haven’t done too much about the [ overload yet, trying to identify the problem. 3. Tried to write out the logic first, now going through and debugging. 4. https://pastebin.com/qNrfbU2z
Vamsi O
Can I know the best group for c++ free tutorial s
None
Hello i am new here
klimi
Hi new here
Ибраги́м
Interesting video: "Performance Matters" by Emery Berger Just fell over this video from strangeloop. Interesting presentation given by a most articulate presenter. If performance interests you, it is definitely worth a watch. Link added: https://youtu.be/r-TLSBdHe1A https://redd.it/dbi1r8 @r_cpp
klimi
Interesting but isn’t it OT?
He is sending this periodically
Ибраги́м
Interesting but isn’t it OT?
-O3 and -O2 screams C++!
klimi
Welcome
Osbaldo
thanks
klimi
You're welcome
14•08
Welcome
Klimii how did yo write extension words in youre name
klimi
What?
14•08
What?
Amean youre gender
klimi
Oh its admin tag
klimi
Custom admin tag
14•08
Custom admin tag
Ooh gat yah
Ilya
Can I know the best group for c++ free tutorial s
No tutorials, it's not a monkey language, read books.
14•08
But iwanna be admin too
Anonymous
/rules
Anonymous
But iwanna be admin too
No, you don't
Ибраги́м
https://www.youtube.com/watch?v=IAdLwUXRUvg
MᏫᎻᎯᎷᎷᎬᎠ
MᏫᎻᎯᎷᎷᎬᎠ
C++ version
Ибраги́м
MᏫᎻᎯᎷᎷᎬᎠ
/bam
Abuse of authority
Ибраги́м
Abuse of authority
Yep, that's what the committee is for
MᏫᎻᎯᎷᎷᎬᎠ
Yep, that's what the committee is for
Was he really serious about receiving death threats?!
Muhammad
What kind of Pdf books do u have guys for C programming beginners?
Muhammad
I want to learnit from beginning