Anonymous
/ban offtop and multiple screen photos
Talula
Ty
Paste the code here... don't put screen pictures.
ברני
What the heck are you trying to do?
I don't know.. It didn't work.. I tried to do when a friend write his name it tells his bio...
Anonymous
What the heck are you trying to do?
Probably trying to code while having no idea how to do it
ברני
Paste the code here... don't put screen pictures.
Yea first time notice by great Danya 😊
Talula
I don't know.. It didn't work.. I tried to do when a friend write his name it tells his bio...
Yeah but from screen photo your code is "Wrong" beyond wrong... paste the code so we could correct it if need be.
Talula
So no point to send it.. If stamen is wrong as well?
It's wrong but it's easier not to type everything.
Talula
Trust me no one wants to look at your screen and type the names... paste it so we don't have to type everything looking at your screen.
MengShu
The friends is a 20 bytes length char array. You can put only 20 characters in it. You need to search how to use char array first.
ברני
https://onlinegdb.com/BkTxJ6pDD
ברני
that's the last one I wrote
ברני
but I guess it's also wrong
ברני
So what? That is how you learn to code...
But please try to help me if you can with hints then answers.. I'm a begginer and I really want to learn to do that 🙈
MengShu
But please try to help me if you can with hints then answers.. I'm a begginer and I really want to learn to do that 🙈
You just need to declare a variable for the input name, for example char name[20]. Then use scanf to get the user input and store to name array. After that, use strcmp to check compare the content of name array.
Talula
Will try, ty
#include <iostream> #include <string> using namespace std; int main () { string Name; cout<<"Enter the name:"; cin>>Name; if (Name == "Daniel") { cout<<"Hey Daniel! how are you?\nBio: Burn on January 19th 1994, at the age 13 Daniel met Zack for the first time on they're Roller blades, a short time after he met Peter as well.\n at the age 22, Daniel went to Ukraine to be a Doctor.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } else if (Name == "Peter") { cout<<"Hey Peter! how are you?\nBio: Burn on August 16th 1993, at the age 5 He came to Israel with his parents and lived in Netanys ever since.\n at the age 6 he went to Yeoda Anasi school there he met Zack (The Amazing.)\n at the age 25 he got his carrer job as receptionist in 'Azimuth-Meddi-Terre' hotel and became a talented Optima user.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } else if (Name == "Luba") { cout<<"Hey Luba! how are you?\nBio: Burn on December 13th 1993, at the age 6 she came to Israel with her family.\n at the age 16 Lubas parents dicided to move back to Ukraine and Luba left Zack (HER LOVE OF HER LIFE!).\n At the age 18 Zack and Luba connected again with Skype, after a year of talking, Luba and her family went back to Israel, The 2 love birds met again and after 4 years they broguht Princes Luna to the family.\n and now at the age 27 Luba is working in her dream Job, Married to the Amazing Zack, and having Beutiful princes Luna.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } return 0; }
ברני
#include <iostream> #include <string> using namespace std; int main () { string Name; cout<<"Enter the name:"; cin>>Name; if (Name == "Daniel") { cout<<"Hey Daniel! how are you?\nBio: Burn on January 19th 1994, at the age 13 Daniel met Zack for the first time on they're Roller blades, a short time after he met Peter as well.\n at the age 22, Daniel went to Ukraine to be a Doctor.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } else if (Name == "Peter") { cout<<"Hey Peter! how are you?\nBio: Burn on August 16th 1993, at the age 5 He came to Israel with his parents and lived in Netanys ever since.\n at the age 6 he went to Yeoda Anasi school there he met Zack (The Amazing.)\n at the age 25 he got his carrer job as receptionist in 'Azimuth-Meddi-Terre' hotel and became a talented Optima user.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } else if (Name == "Luba") { cout<<"Hey Luba! how are you?\nBio: Burn on December 13th 1993, at the age 6 she came to Israel with her family.\n at the age 16 Lubas parents dicided to move back to Ukraine and Luba left Zack (HER LOVE OF HER LIFE!).\n At the age 18 Zack and Luba connected again with Skype, after a year of talking, Luba and her family went back to Israel, The 2 love birds met again and after 4 years they broguht Princes Luna to the family.\n and now at the age 27 Luba is working in her dream Job, Married to the Amazing Zack, and having Beutiful princes Luna.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } return 0; }
Didn't get yet to cout and cin.. Should I as a begginer?
ברני
#include <iostream> #include <string> using namespace std; int main () { string Name; cout<<"Enter the name:"; cin>>Name; if (Name == "Daniel") { cout<<"Hey Daniel! how are you?\nBio: Burn on January 19th 1994, at the age 13 Daniel met Zack for the first time on they're Roller blades, a short time after he met Peter as well.\n at the age 22, Daniel went to Ukraine to be a Doctor.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } else if (Name == "Peter") { cout<<"Hey Peter! how are you?\nBio: Burn on August 16th 1993, at the age 5 He came to Israel with his parents and lived in Netanys ever since.\n at the age 6 he went to Yeoda Anasi school there he met Zack (The Amazing.)\n at the age 25 he got his carrer job as receptionist in 'Azimuth-Meddi-Terre' hotel and became a talented Optima user.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } else if (Name == "Luba") { cout<<"Hey Luba! how are you?\nBio: Burn on December 13th 1993, at the age 6 she came to Israel with her family.\n at the age 16 Lubas parents dicided to move back to Ukraine and Luba left Zack (HER LOVE OF HER LIFE!).\n At the age 18 Zack and Luba connected again with Skype, after a year of talking, Luba and her family went back to Israel, The 2 love birds met again and after 4 years they broguht Princes Luna to the family.\n and now at the age 27 Luba is working in her dream Job, Married to the Amazing Zack, and having Beutiful princes Luna.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } return 0; }
And ty very much 😱✌️
ברני
C++
Oh it's for c++?
Talula
In C you'll have to use cmpstr and stuff... not really fun.
ברני
In C you'll have to use cmpstr and stuff... not really fun.
Oh, so I can't do it on C with no out programs?
Talula
Oh, so I can't do it on C with no out programs?
Trust me strings and C programs don't go hand in hand... there is no such thing as string in C, it's all array of char.
.
anyone knows c language?
ברני
Trust me strings and C programs don't go hand in hand... there is no such thing as string in C, it's all array of char.
Oh I see.. So I'll wait with this until I'll go to c++..Friends told me I should after c to go to c# But I guess I'll understand it later.. Anyway ty alot Tazz, And sorry guys if I'm a little annoying..
.
i want division and subtraction of it
ברני
Lol I think his a troll
.
Seriously?
help me i dunno programming languages my friend want it so..😒
ברני
How to divide 2 int in c? - Stack Overflow https://stackoverflow.com/questions/35069863/how-to-divide-2-int-in-c/35069900
أسامة
help me i dunno programming languages my friend want it so..😒
i can help you by advicing you to work harder, you and your friend
أسامة
😒
i helped you, more than anyone in this life
أسامة
believe me
ברני
Seriously?
BTW, it wouldn't work if I'll do If (Friends ==Bob) { printf("" ) ; } Instade the cout and the other?
أسامة
if (Friends == "Bob") and it'll work in C++ not C
won't work if Friends is a c-style string , even in c++
Talula
won't work if Friends is a c-style string , even in c++
There is no such thing as "c-style string" C has Array of Chars.
أسامة
أسامة
Well not my fault.
but at the end there is "such thing as c-style string"
أسامة
even if it wasn't a class
Dima
/warn 971477199 unapproved link
Mhmd
/warn
Wisenky
http://bsd.to/xLnQ https://bsd.to/YpwA https://bsd.to/DouV I got src/map.o:map.cpp:(.bss+0x0): multiple definition of `Map::Laby' src/main.o:main.cpp:(.bss+0x0): first defined here errors , what should I do sirs ?
أسامة
and line 9 looks strange
Anonymous
Is anyone has done coursera C for everyone :structured programming Week 6
Wisenky
and line 9 looks strange
I solved with deleting singleton implementation .cpp file
Tekipeps
/get
Anonymous
I am wondering what the tanh^2 in 1 - tanh^2(x) means How can I do tanh^2 in a calculator !?
Anonymous
ty yes I finally got it down to; // if(x > 0) // return 1 - pow(x, 2); // else // return 1 + pow(x, 2); return 1-(x*x); lol
Anonymous
I was trying to get the derivative of the tanh function
Anonymous
sorry x is the output of tanh()
Anonymous
why do they write it as tanh^2(x) and not tanh(x)^2 lol
carnivorous plant
#include <iostream> #include <string> using namespace std; int main () { string Name; cout<<"Enter the name:"; cin>>Name; if (Name == "Daniel") { cout<<"Hey Daniel! how are you?\nBio: Burn on January 19th 1994, at the age 13 Daniel met Zack for the first time on they're Roller blades, a short time after he met Peter as well.\n at the age 22, Daniel went to Ukraine to be a Doctor.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } else if (Name == "Peter") { cout<<"Hey Peter! how are you?\nBio: Burn on August 16th 1993, at the age 5 He came to Israel with his parents and lived in Netanys ever since.\n at the age 6 he went to Yeoda Anasi school there he met Zack (The Amazing.)\n at the age 25 he got his carrer job as receptionist in 'Azimuth-Meddi-Terre' hotel and became a talented Optima user.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } else if (Name == "Luba") { cout<<"Hey Luba! how are you?\nBio: Burn on December 13th 1993, at the age 6 she came to Israel with her family.\n at the age 16 Lubas parents dicided to move back to Ukraine and Luba left Zack (HER LOVE OF HER LIFE!).\n At the age 18 Zack and Luba connected again with Skype, after a year of talking, Luba and her family went back to Israel, The 2 love birds met again and after 4 years they broguht Princes Luna to the family.\n and now at the age 27 Luba is working in her dream Job, Married to the Amazing Zack, and having Beutiful princes Luna.\n Hobbies: Gaming & Anime, Favorit color: I don't care.\nGood-bye :)\n"; } return 0; }
but why they all were burnt :C
Engineer
but why they all were burnt :C
The word should be born instead ?
Talula
but why they all were burnt :C
God knows... I just rewrote what the other guy wanted.
Engineer
God knows... I just rewrote what the other guy wanted.
If you don't mind the syntax error for English would say out of context for Got knows. Did you mean God knows?
Engineer
Most welcome, maybe we should write a compiler for English. I am learning about parses and lexers
Anonymous