Home  | Tutorials  |  Forum  iGrade  |  Resources  |  Assignment  |  Webmaster
C++ Code for Number to Word Conversion Sample Codes in Swishmax
int numb,tthou=0,thund=0,ttens;
int thou=0,hund=0,tens=0,ones=0,flag=0;
cout<<"Enter a number:\t\t";
cin>>numb;

if((numb>=1000) && (numb<=10000)){
   thou = numb / 1000;
   tthou=thou;
   numb = numb % 1000;
}

if(numb>=100){
   hund = numb / 100;
   thund=hund; numb = numb % 100;
}

if(numb>=10){
   tens = numb / 10;
   ttens=tens;
   numb = numb % 10;
}

ones=numb;
cout<<"Amount in words:\t";

switch(thou){
   case 10:cout<<"Ten "; break;
   case 9:cout<<"Nine "; break;
   case 8:cout<<"Eight "; break;
   case 7:cout<<"Seven "; break;
   case 6:cout<<"Six "; break;
   case 5:cout<<"Five "; break;
   case 4:cout<<"Four "; break;
   case 3:cout<<"Three "; break;
   case 2:cout<<"Two "; break;
   case 1:cout<<"One "; break;
}

if(tthou!=0) cout<<"Thousand ";

switch(hund){
   case 9:cout<<"Nine "; hund-=900; break;
   case 8:cout<<"Eight "; hund-=800;
  
...continue the same procedure
}
if(thund>=1) cout<<"Hundred ";

...do the same thing for tens and ones
To play a sound automatically upon loading the movie, insert the given codes below:

onFrame (1)
{
   playSound("Parting Time.mp3");
}

To play a sound only when a user clicks a button or any object, insert the given codes below: 

on(Press)
{
   playSound("Parting Time.mp3");
}
-
Sample Scripts in ASP.Net
Transfer from one page to another page
   server.transfer(~/page.aspx,"true"); OR
   response.redirect(~/page.aspx,"true");

Retain values from one page to another page
   session("input1") = txtbox1.Text; //Current page
   txtInput.Text = session("input1"); //Destination page
-
Topics for Finals in ASP.Net Programming
ASP.Net Online
XML
JavaScript
Introduction to AJAX
-
Topics for Finals in Applications Programming
For Loop
While Loop
Do While Loop
Functions
-
Webmaster's Contact
Should you have any queries, comments, or suggestions feel free to email the webmaster at ebabes0526@yahoo.com.

All academically related questions will be promptly attended.You may also register in the forum section of this site, http://ebabes.easyphpbb.com, to avail of the exclusive services of this site.
Special thanks to www.aspspider.net for hosting this site FREE. You may browse the host in this link.
 EBabes Digital Solutions. All Rights Reserved. Copyright 2008