help guys i really need help with this problem as i have 0 knowledge regarding c++ pls help !!!

convert a positive integer code into its english name equivalent for digit. A valid code is of size between four (4) to six (6) digits inclusive. A zero is not allowed in the code.

example : if the input is 234056 the output is : INVALID CODE (PRESENCE OF ZERO)
if the input is 23456 the output is : TWO THREE FOUR FIVE SIX
if the input is 9349 the output is : NINE THREE FOUR NINE
if the input is 245 the output is : INVALID CODE (3 DIGITS)
if the input is 2344567 the output is : INVALID CODE (7 DIGITS)

step 1 : input code
step 2 : count the number of digits in the code
step 3 : if there is a zero in the code, "INVALID CODE (PRESENCE OF ZERO)" go to step 4
step 4 : if number of digits is mode or equal than 4 and less or equal than 6, go to step 5 else display the following message "INVALID CODE (<number of digits> DIGITS)
step 5 : call a function called digit_name to convert each digit into its
equivalent english name. display the result
step 6 : print the digits in reverse order
eg; if input is 13453, reverse order is 35431
If this is true:
i have 0 knowledge regarding c++

then the place to start is here:
http://www.cplusplus.com/doc/
this is my assignment question and i need to submit it by this tuesday
If you show the code you have written so far for this assignment, we should be able to help you overcome whatever obstacles you encounter.
#include <iostream>
using namespace std;
int main ()
{
int code;
int count=0;
int k,l,m,n,o;
int A[10];
int q,r;
int h,i,j;


cout<<"key-in the code : ";
cin>>code;

l=1;
k=code;
while (k)
{
count++;
k=k/10;
l=l*10;
m=count;

}
cout<<"total digit of code : "<<m<<endl;
cout<<"result m : "<<l<<endl;

for (i=0;i<=9;i++)
A[i]=0;
i=0;
q=code;
n=l;

while (q!=0)
{
r=q;
n=n/10;
q=r/10;
r=r%10;
A[i]=r;
i=i+1;

}
for (j=i-1;j>=0;j--)

cout<<""<<A[j];

if (m<=3)
cout<<"INVALID CODE ("<<m<<" DIGITS)"<<endl;
else if (m>6)
cout<<"INVALID CODE ("<<m<<" DIGITS)"<<endl;


return 0;
}
this is what i did so far.... but my sir said it still wrong
Please, use code tags and intuitive indentation: http://www.cplusplus.com/articles/jEywvCM9/

Where is step 5?

Steps 3 and 4 should prevent further processing and output.

I cannot fathom what your loops try to do.
honestly i really have no idea what to do now .... my due date is today at 4pm.... i'm really confused ...
1. Read a word.
2. Test if word contains character '0'.
3. Test the lenght of the word.
Only if 2 and 3 were ok: 4. Call digit_name with each character.
5. Print the word in reverse.
Topic archived. No new replies allowed.