this is my code its only the beginning
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int a;
loop6:
cout << "what key do u wish to use: ";
cin >> a;
if (a == 1)
goto loop;
else if (a == 2)
goto loop2;
else if (a == 3)
goto loop3;
else if (a == 4)
goto loop4;
else if (a == 5)
goto loop5;
else
goto loop6;
loop:
loop2:
loop3:
loop4:
loop5:
system("PAUSE") ;
return EXIT_SUCCESS;
}
each key they go to will be a different code
what this program is supossed to do is when they type in a sentence it converts each letter to a number and each key will convert the letters to different numbers.
my problem is a dont know how to scan the sentence they type in for a certain letter.
thanks in advance
i hope you understand the question
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int a;
loop6:
cout << "what key do u wish to use: ";
cin >> a;
if (a == 1)
goto loop;
else if (a == 2)
goto loop2;
else if (a == 3)
goto loop3;
else if (a == 4)
goto loop4;
else if (a == 5)
goto loop5;
else
goto loop6;
loop:
loop2:
loop3:
loop4:
loop5:
system("PAUSE") ;
return EXIT_SUCCESS;
}
each key they go to will be a different code
what this program is supossed to do is when they type in a sentence it converts each letter to a number and each key will convert the letters to different numbers.
my problem is a dont know how to scan the sentence they type in for a certain letter.
thanks in advance
i hope you understand the question
Comment