elow,I'm new to this groups and also new in C++
i need help about writing a program that will ask the user for an 
integer number and output the equivalent of t the input (1000-3000) 
limit inclusive

ex:

input:1954
output: one thousand nine hundred fifty-four

this is my code

#include<iostream.h>

void main()
{
   int num;
   cin>>num;
   
   if(num < 1000 || num > 3000)
   {
      cout<<"invald";
   }
   else
    {
      temp = num/1000
      num = num%1000;
      switch(temp)
      {
        case 1 : cout<<"one thousand";
        ....
 ........................
please help me i dont know if the code is right please anyone who 
can give me the right code for thisproblem

thanks a lot,I'm really confuse T_T



Reply via email to