10-15-2013, 02:48 PM
|
#5
|
FFR Veteran
Join Date: Jan 2007
Age: 33
Posts: 2,407
|
Re: Requesting help for programming/ CS majors?
Thanks for the input!
Anyways, I believe we are allowed to use commands that do it for us. And I meant to put in characters, not integers. Afterall, we are input letters, not numbers haha. THis is what I have. It's still wrong, but yeah.
#include <iostream>
using namespace std;
int main()
{
char name[12];
char i;
for(i=0; i<12; i++) name[i] = i;
cout << "Please enter your name one letter at a time: ";
cin >> name;
for(i=0; i<12; i++)
cout << "This is letter ["<< i <<"]: " << name[i] << "\n";
int dummy;
cin >> dummy;
return 0;
}
Basically what I'm trying to get it to do. IS make it ask me to input one letter. So I would put in letter e. Then it would ask me to input another letter, in which I put "r". So on and so fourth. then once I'm done inputting all the letters, it will take every letter, put it into an array, and make them in alphabetical order.
__________________
Last edited by Superfreak04; 10-15-2013 at 02:52 PM..
|
|
|