2. Counting in Lojban, an artificial language developed
over the last fourty years, is easier than in most languages
The numbers from zero to nine are:
0 no
1 pa
2 re
3 ci
4 vo
5 mk
6 xa
7 ze
8 bi
9 so
Larger numbers are created by gluing the digit togather.
For Examle 123 is pareci
Write a program that reads in a lojban string(representing
a no less than or equal to 1,000,000) and output it in
numbers.

Answer Posted / ts

U can easily do this in c i am writing a code you just make its function by your self.Its easy one

#include<stdio.h>
main()
{
int i=0;
char ptr,d;
char c[20];
do
{
printf(" \n Enter the lujban String whose equivalent number is to be printed \n");
scanf("%s",c);
while(c[i]!='\0')
{

switch(c[i])
{
case'n':printf("0");
break;
case 'p':printf("1");
break;
case 'r':printf("2");
break;
case 'c':printf("3");
break;
case 'v':printf("4");
break;
case 'm':printf("5");
break;
case 'x':printf("6");
break;
case 'z':printf("7");
break;
case 'b':printf("8");
break;
case 's':printf("9");
break;
}
i++;
}
printf(" \nDo you want to continue(Y/N)");
d=getche();

}
while(d=='y'||d=='Y');

}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many keywords are there in c?

602


What is a function in c?

582


What is the use of #define preprocessor in c?

625


What does the format %10.2 mean when included in a printf statement?

1097


Tell us bitwise shift operators?

608






When should the const modifier be used?

664


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

659


What is the acronym for ansi?

642


What is unsigned int in c?

569


Write a code to generate a series where the next element is the sum of last k terms.

744


What is function pointer c?

593


difference between object file and executable file

6106


Who developed c language?

646


Explain what will the preprocessor do for a program?

610


What are the types of i/o functions?

693