Here is what I got so far. Please note that I can't use arrays because I don't know them. I am a complete beginner. So I just want use to loops and I thought if is the more appropriate one. My problem is in getting to print out the words of more than one digit. So if I have 4327, I want four-three-two-seven to be printed out. That is where I am stuck and I don't know arrays or pointers, just a bit of loops.
Code:
#include <iostream>
using namespace std;
int main (){
int num,digit1,digit2,digit3,digit4;
cout<<"Please enter a four digit number";
cin>>num;
digit1=(num/1000);
digit2=(num/100)%10;
digit3=(num/10)%10;
digit4=num%10;
if (digit1,digit2,digit3,digit4==0) cout<<"zero";
else if (digit1,digit2,digit3,digit4==1) cout<<"one";
else if (digit1,digit2,digit3,digit4==2) cout<<"two";
else if (digit1,digit2,digit3,digit4==3) cout<<"three";
else if (digit1,digit2,digit3,digit4==4) cout<<"four";
else if (digit1,digit2,digit3,digit4==5) cout<<"five";
else if (digit1,digit2,digit3,digit4==6) cout<<"six";
else if (digit1,digit2,digit3,digit4==7) cout<<"seven";
else if (digit1,digit2,digit3,digit4==8) cout<<"eight";
else if (digit1,digit2,digit3,digit4==9) cout<<"nine";
return 0;
}