/*mycfiles.wordpress.com
program to convert digits to character*/
#include
#include
void main()
{
int a[5],i,n;
clrscr();
cout<<"Enter the Value";
cin>>n;
for(i=4;i>=0;i--)
{
a[i]=n%10;
n=n/10;
}
for(i=0;i<5;i++)
{
if(a[i]!=0)
{
switch(a[i])
{
case 0:cout<<"Zero";
break;
case 1:cout<<"One";
break;
case 2:cout<<"Two";
break;
case 3:cout<<"Three";
break;
case 4:cout<<"Four";
break;
case 5:cout<<"Five";
break;
case 6:cout<<"Six";
break;
case 7:cout<<"Seven";
break;
case 8:cout<<"Eight";
break;
case 9:cout<<"Nine";
break;
}
}
}
getch();
}
------------------------------------------------------------------------------------
Program to Convert Numbers into Words
#include
void pw(long,char[]);
char *one[]={" "," one"," two"," three"," four"," five"," six"," seven","
eight"," Nine"," ten"," eleven"," twelve"," thirteen"," fourteen","
fifteen"," sixteen"," seventeen"," eighteen"," nineteen"};
char *ten[]={" "," "," twenty"," thirty"," forty"," fifty"," sixty","
seventy"," eighty"," ninety"};
void main()
{
long n;
clrscr();
printf("
Enter any 9 digit no: ");
scanf("%9ld",&n);
if(n<=0)
printf("Enter numbers greater than 0");
else
{
pw((n/10000000),"crore");
pw(((n/100000)%100),"lakh");
pw(((n/1000)%100),"thousand");
pw(((n/100)%10),"hundred");
pw((n%100)," ");
}
getch();
}
void pw(long n,char ch[])
{
(n>19)?printf("%s %s ",ten[n/10],one[n%10]):printf("%s ",one[n]);
if(n)printf("%s ",ch);
}
// for any query visit
// "http://www.c.happycodings.com/Beginners_Lab_Assignments/code51.html"
Program to Convert Numbers into Words
#include
void pw(long,char[]);
char *one[]={" "," one"," two"," three"," four"," five"," six"," seven","
eight"," Nine"," ten"," eleven"," twelve"," thirteen"," fourteen","
fifteen"," sixteen"," seventeen"," eighteen"," nineteen"};
char *ten[]={" "," "," twenty"," thirty"," forty"," fifty"," sixty","
seventy"," eighty"," ninety"};
void main()
{
long n;
clrscr();
printf("
Enter any 9 digit no: ");
scanf("%9ld",&n);
if(n<=0)
printf("Enter numbers greater than 0");
else
{
pw((n/10000000),"crore");
pw(((n/100000)%100),"lakh");
pw(((n/1000)%100),"thousand");
pw(((n/100)%10),"hundred");
pw((n%100)," ");
}
getch();
}
void pw(long n,char ch[])
{
(n>19)?printf("%s %s ",ten[n/10],one[n%10]):printf("%s ",one[n]);
if(n)printf("%s ",ch);
}
// for any query visit
// "http://www.c.happycodings.com/Beginners_Lab_Assignments/code51.html"
It depends on to what level of accuracy you tend to have with the output of your program Accuracy can be treated as: (Desired Output / Actual Output of your Program)
help me now !!
There is no need for a combinatorial circuit to multiply a number by two. A binary number, left shifted one place, is twice the original binary number. The specific answer to the question is that you would connect the three input lines to the three high order output line of four output lines, and connect the low order bit of the four output lines to logic 0. If the three input lines were labelled A, B, and C, the output would be A, B, C, and 0.
you mean like show some sample output? Just put it in comments at the bottom. Run the program, and in the top left of the command prompt there is a button you can click. Select mark, highlight the output, then select copy. Paste it onto the end of the program.
1) source program to object program 2)object program to object program output
A Microphone does not output sound. It accepts sound. It is an input device.
Any program whose output is: " Don't waste your time! There is no highest number. Never was, never will be."
It depends on to what level of accuracy you tend to have with the output of your program Accuracy can be treated as: (Desired Output / Actual Output of your Program)
No, as long as it calculates something, displays something, or otherwise has an output that benefits the user, it is a program. It could be a program that makes a random number, or a program that tells the user a joke from a database.
help me now !!
Output documentation
Design and draw a combinational circuit using AND-OR-NOT gates that accepts 4 input bits, and produces two bit output; the first of the two bits is set to 1 if the number of 1's in the input is even; and the second of the output bit is set to 1 if the input have 3 or more (all four) 1 bits.
input output bound program is a program (or process in precise way), which spends most of time allocated to it for execution, on input/output devices and need very small CPU time for it.
There is no need for a combinatorial circuit to multiply a number by two. A binary number, left shifted one place, is twice the original binary number. The specific answer to the question is that you would connect the three input lines to the three high order output line of four output lines, and connect the low order bit of the four output lines to logic 0. If the three input lines were labelled A, B, and C, the output would be A, B, C, and 0.
It accepts input, processes data, stores data, and produces output.
A Computer Output Electricity in Computercraft cannot be said to make a program to output power, regardless of the side.
you mean like show some sample output? Just put it in comments at the bottom. Run the program, and in the top left of the command prompt there is a button you can click. Select mark, highlight the output, then select copy. Paste it onto the end of the program.