Write a function named digit_name

Assignment Help C/C++ Programming
Reference no: EM13339029

Write a function named "digit_name" that takes an integer argument in the range from 1 to 9 , inclusive, and prints the English name for that integer on the computer screen. No newline character should be sent to the screen following the digit name. The function should not return a value. The cursor should remain on the same line as the name that has been printed. If the argument is not in the required range, then the function should print "digit error" without the quotation marks but followed by the newline character. Thus, for example,

the statement digit_name(7); should print seven on the screen;
the statement digit_name(0); should print digit error on the screen and place
the cursor at the beginning of the next line.

Reference no: EM13339029

Questions Cloud

How far does the person travel : A person takes a trip, driving with a constant speed 90 km/h except for a 15 minute rest stop. If the person's average speed is 45 km/h, how far does the person travel
Why are academic health centers are vital : Why are academic health centers are vital to research and technology? give 3 examples
What is the output of the loop as it is written : Correct the syntax of the loop so that the logic of the corrected loop corresponds to the formatting of the original loop. What is the output of the corrected loop?
Discuss the potential negative impact of a dominant culture : To prepare: Review "Working With Immigrants and Refugees: The Case of Aaron."
Write a function named digit_name : Write a function named "digit_name" that takes an integer argument in the range from 1 to 9 , inclusive, and prints the English name for that integer on the computer screen.
Write a function named is_prime : Write a function named "is_prime" that takes a positive integer argument and returns as its value the integer 1 if the argument is prime and returns the integer 0 otherwise.
Find the terminal velocity of the sled : A test sled has a mass of 400 kg and is acted on by a thrust force of 200,000 N. It also experiences a viscous drag of 1600•V where V is the velocity. Find the 'terminal velocity' of the sled
Rreasons unrelated to the organ : Transplantable organs become available on short notice--usually because a donor has died for reasons unrelated to the organ. They need to be removed and transplanted very quickly because they only remain fresh for a limited period. Then there i..
What is current in the loop when the torque is at max value : The loop consists of a single turn of flexible conducting wire that is wrapped around a flexible mount such that the dimensions of the rectangle can be changed.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create a program for a company named retail-mart

Prompt the user to enter an item name (one word only), a quantity and a price. For this step, in addition to functionality, I'll be looking at: location of the variable declarations; appropriateness of data types selected; appropriateness of the va..

  Brownian motion is a physical phenomenon

Brownian motion is a physical phenomenon which can be observed, for instance, when a small particle is immersed in a liquid.

  Program to store lists of names and ages in parallel arrays

Write a C++ program that stores lists of names (the last name first) and ages in parallel arrays and sorts the names into alphabetical order keeping the ages with the correct names.

  Need a prg that lets user enter total rainfal

Need a prg that lets user enter total rainfall for each of 12 months into an array of doubles,prg should then calculate and display total rainfall for year,the average monthly rainfall, and the months with highest and lowest amounts

  Define a structure to store marks of a student

Define a structure to store roll no, name and marks of a student - using the structure of Q2. a), above write a 'C' program to create a file "student.dat". There must be one record for every student in the file.

  Program to next the loops in either direction

You can write your program to next the loops in either direction, that is, process row-by-row or column-by-column. Explain which way you would choose to process the data.

  Program that incorporates these two functions

Write the program that incorporates these two functions, as described. You will notice that the two functions have very similar statements, so you are doing some repetitive C++ code.

  Two-dimensional array of double to hold the sales

Suppose you have a two-dimensional array of double to hold the sales amounts for all your salespeople three years. Assume you employ 50 salespeople and this array already holds valid data.

  Write a count occurrences() function that accepts a string

Write a CountOccurrences() function that accepts a string to be searched and a sub-string to be found. The function should return the # of times the sub-string is found. Write a tester file that declares a secret sentence as a constant.

  Program calculates and displays salesperson''s commission

The sales manager at Tompkins Company wants a program that calculates and displays each salesperson's commission, which is 10% of his or her sales. It also should display the total commission. Use a value-returning function to get the amount sold by ..

  A program computes and displays the number of centimeter

The Earth's ocean levels have risen an average of 1.8 millimeters per year over the past century. Write a program computes and displays the number of centimeters and number of inches the oceans rose during this time.

  Compute for the monthly billing of their customers

An electric company wants to compute for the monthly billing of their customers. the company charges P2.50 per kwh and utility tax of 3% of the current bill shall be added.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd