answersLogoWhite

0


Best Answer

Been so long since I wrote c I cant remember much about it. You will have to create a key capture process. If someone enters a charchacter have the ascii value compared to a list of instructions that you want it to perform.

If 1 then replace value sent to screen with "one"If 2 then replace value sent to screen with "two"etc.

It is a relatively simple program. It has just been 15 yrs or so since I have written anything so I can only give you generic examples.

Hope this helps some.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How to write a program in c which takes any random number like '1' '2' as input and give output 'one''two'?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is there such thing random numbers?

yes, because the number generated is from the computer's CPU database and is selected randomly therefore it must be a random number It depends on how the numbers are generated. If they are based on things in the environment, like noise levels, then yes. If they are solely generated by computer functions, then no, they are pseudo-random numbers, which will be random enough for most purposes.


What is Hardware random number generator?

In computing, a hardware random number generator is an apparatus that generates random numbers from a physical process.


What do randomize number means in qbasic?

QBASIC CODE/EXAMPLE 1: WITHOUT 'RANDOMIZE' statement:- ==== RANDOMIZE TIMER CLS FOR eachDiceThrow% = 1 TO 10 diceNo% = INT(RND * 6) + 1 PRINT diceNo%; " "; NEXT END ===== ...output... 5 3 6 3 1 3 6 1 1 6 ...re-RUN/output... 6 2 6 5 1 4 1 5 6 5 As you can see from the above 2 code examples. When we don't use the RANDOMIZE statement; then, each time we run the program...the sequence of random numbers that gets produced...is always in the same 'fixed' order as went before. But, when we do use the RANDOMIZE command statement; then, each time the sequence of random numbers being produced is entirely 'different'. NOTE: The statement, RANDOMIZE TIMER, is used to 'seed' the QBASIC random number generator; by selecting a random number to start the sequence of numbers off with which is based on your current computer clock time.


Could you write a java program that randomly generate a number plate for a car registration using the random method from Maths class eg NLF810?

yes, use for loop;;


How do you make a random number using Python?

this is the code for making a random number using python: import random >>>random.randint (1, 10) you can do whatever numbers you want.

Related questions

Is a program with no input an incorrect 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.


The output of the pseudo-random number generator?

Is a set of numbers that look random and will pass most tests of randomness.


What is a random number?

* A number generated for or part of a set exhibiting statistical randomness. * A random sequence obtained from a stochastic process. * An algorithmically random sequence in algorithmic information theory. * The output of a random number generator. * The least random number (17), according to the Hacker's Jargon File.


Write a c program to print different number into a random order at number of compile times?

This program generates so called pseudo random numbers, and it used srand() function to connect the seed for the random number generator to the current. Which makes it less predictable but cannot claimed as a real random number generator.#include #include #include int main(){srand((unsigned) time(NULL));std::cout


What is rand on the graphing calculator and what does it do?

The calculator will run a certain number of random numbers to test a program.


How do you create stream of random number using c language?

Use rand() which returns any random number To be more precise , use random(a) which returns any number from 0 to a-1 For compiling the program again and again , use randomize() so that every time it takes different random numbers. It may be rand <-> random Check it out...


What is random number in?

a random no. is just random!:]


What is a random number table?

Random numbers (or random deviates) are numbers chosen totally by chance, but also conform to a certain distribution. The most common distribution is the uniform distribution. If I say that a number is chosen totally by chance between 1 and 100, and there is equal chance that every number between 1 and 100 can be chosen, then this is a uniformly distributed random number. If I list these generated numbers in a table, then this is a random number table. A program like Excel can easily generate uniform random numbers from 0 to 1, by entering +rand() into a column in the spreadsheet. To calculate a new table, press F9.


Is RAM an input or output device?

RAM (Random Access Memory) is a storage device


What is the use of random number in medical counseling?

what is the use of mbbs counselling random number, how to find the college related to random number


How do you find a random number from random number table?

randomly look...


How do you make randomisers?

Often, for computer randomisers, the computer reads the digits of pi as they appear to be in a random order so will have an appeared to be random output.