CMPC
Would you like to react to this message? Create an account in a few clicks or log in to continue.

stuck

CMPC :: Computing :: Programming :: C++

Go down

stuck Empty stuck

Post by Lunsfordium Wed Aug 25, 2010 11:15 pm

i was bored so i was trying to make this
originally in two files but here it is
Code:

#include <iostream>
#include "windows.h"
using namespace std;

int main()
{
    int a, b, c, d, e, f, g, h, i;
    command(a, b, c, d, e, f, g, h, i);
    cout << a;
    cout << b;
    /*cout << c;
    cout << d;
    cout << e;
    cout << f;
    cout << g;
    cout << h;
    cout << i;*/
    return 0;
}

void command(int one, int two, int three, int four, int five, int six, int seven, int eight, int nine)
{
    char arry[10];
    char letters[27]= {'abcdefghijklmnopqrstuvwxyz'};
    cin >> arry;
    int count = 0;
    for (count=0; count <= 9; count++)
    {
        int lame= 0;
        for (lame=0; lame <= 25; lame++)
        {
            if (arry[count]=letters[lame])
            {
                switch (count)
                {
                case 0:
                    one=(lame+1);
                    break;
                case 1:
                    two=(lame+1);
                    break;
                case 2:
                    three=(lame+1);
                    break;
                case 3:
                    four=(lame+1);
                    break;
                case 4:
                    five=(lame+1);
                    break;
                case 5:
                    six=(lame+1);
                    break;
                case 6:
                    seven=(lame+1);
                    break;
                case 7:
                    eight=(lame+1);
                    break;
                case 8:
                    nine=(lame+1);
                    break;
                }
            }
        }
    }
}
any help would be nice

and i made sure that it was formatted prettily for corey

anyone else anxious? Sad
Lunsfordium
Lunsfordium
[Blankie]

Posts : 194

Back to top Go down

Back to top


CMPC :: Computing :: Programming :: C++

 
Permissions in this forum:
You cannot reply to topics in this forum