+ 6
How can i arrange..my given input(for example a name.) into seperate alphabet..
For Example:: If I put my name as:: aryan I want output as: //output a r y a n //end of output I tried making an array for the character to store alphabets of name step by step but it didn't work... Could anyone help me for writing code for this..
10 Réponses
+ 13
Here We Go Aryan !
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str = "Aryan";
for (const auto &i : str) cout << i << endl;
}
+ 13
Finally, you KILL me, man! :D
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str = "";
cout << "What's your name?! "; cin >> str;
for (const auto &i : str) cout << i << endl;
}
+ 12
I'm just kidding. I'm here to help all of you without any expectation. Thank you.
@~)~~~~
+ 10
So give me some motivation to help people!
Next time I cut a deal with you before answering! ;D
+ 6
@ Babak Sheykhan(PERS)..
you don't need motivation bro.. you already have the perfect attitude in yourself and I believe you will be a very great developer in future..
+ 5
Now that's what I wanted..😁😁 Thanks man!!👌👌
+ 4
Embed your code here so people can see your problem snd offer solution.
(Edit)
Sorry for double post, SL said my first failed, turned out it succeeded.
+ 4
Thanks.. but I want the string as input nt fixed.. how can I make it variable so anybody who puts name or any word it can give desired result.
+ 4
@ Ipang ..Thanks