| | |
plz friends help me
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Aug 2006
Posts: 4
Reputation:
Solved Threads: 0
plz friends help me to solve this proplem by c++ language:
Question (Check Protection and word interpretation)
Problem Concept - Computers are frequently used in check-writing systems, such as pay-roll and accounts payable applications. Many strange stories circulate regarding weekly paychecks being printed (by mistake) for amounts in excess of RM 1 million. Weird amounts are printed by computerized check writing systems because of human error and/or machine failure. Systems designers, make every effort to build controls into their systems to prevent erroneous checks from being issued.
Another serious problem is the international alteration of a check amount by someone who intends to cash a check fraudulently. To prevent a dollar amount from being altered, most computerized check-writing systems employ a technique called as check protection.
Problem statement: Write a program that inputs a numeric dollar amount to be printed on a check and then prints the amount in check- protected format with leading asterisks if necessary. Assume that nine spaces are available for printing the amount. Extend the program segment to write the word equivalent of the amount in the following line.
Sample Data: Checks designed for imprinting by computer contain a fixed number of spaces in which the computer may print an amount. Suppose a paycheck contains nine blank spaces in which the computer is supposed to print the amount of a weekly paycheck. If the amount is large, then all the nine of those spaces will be filled. For example,
11 ,230 .60 ß check amount
----------------------------------------
123456789 ß position numbers.
On the other hand, if the amount is less than $ 1000, then several of the spaces wouald be ordinarily left blank. For example:
99 .87 ß check amount
---------------------------------------
123456789 ß position numbers.
contains 3 blank spaces. If a check is printed with blank spaces, it is easier for someone to alter the amount of the check. To prevent a check from being altered, many check-writing systems insert leading asterisks to protect the amount as follows:
****99 .87 ß check amount
----------------------------------------
123456789 ß position numbers.
The program should also print the output of the value of dollars in words in the next line. For example:
112.43 is printed as
RM ***112 .43
ONE HUNDRED TWELVE AND 43/100.
Program Output: The program should read a numeric dollar value, and determine the number of spaces before printing its output with proper check-protection. It should also print the value of the dollar in words in the next line aligning it to the right.
Question (Check Protection and word interpretation)
Problem Concept - Computers are frequently used in check-writing systems, such as pay-roll and accounts payable applications. Many strange stories circulate regarding weekly paychecks being printed (by mistake) for amounts in excess of RM 1 million. Weird amounts are printed by computerized check writing systems because of human error and/or machine failure. Systems designers, make every effort to build controls into their systems to prevent erroneous checks from being issued.
Another serious problem is the international alteration of a check amount by someone who intends to cash a check fraudulently. To prevent a dollar amount from being altered, most computerized check-writing systems employ a technique called as check protection.
Problem statement: Write a program that inputs a numeric dollar amount to be printed on a check and then prints the amount in check- protected format with leading asterisks if necessary. Assume that nine spaces are available for printing the amount. Extend the program segment to write the word equivalent of the amount in the following line.
Sample Data: Checks designed for imprinting by computer contain a fixed number of spaces in which the computer may print an amount. Suppose a paycheck contains nine blank spaces in which the computer is supposed to print the amount of a weekly paycheck. If the amount is large, then all the nine of those spaces will be filled. For example,
11 ,230 .60 ß check amount
----------------------------------------
123456789 ß position numbers.
On the other hand, if the amount is less than $ 1000, then several of the spaces wouald be ordinarily left blank. For example:
99 .87 ß check amount
---------------------------------------
123456789 ß position numbers.
contains 3 blank spaces. If a check is printed with blank spaces, it is easier for someone to alter the amount of the check. To prevent a check from being altered, many check-writing systems insert leading asterisks to protect the amount as follows:
****99 .87 ß check amount
----------------------------------------
123456789 ß position numbers.
The program should also print the output of the value of dollars in words in the next line. For example:
112.43 is printed as
RM ***112 .43
ONE HUNDRED TWELVE AND 43/100.
Program Output: The program should read a numeric dollar value, and determine the number of spaces before printing its output with proper check-protection. It should also print the value of the dollar in words in the next line aligning it to the right.
The first part is simple.
You can use a for loop to print the number of spaces:
Where V is a variable. You could make use of string.length() to ascertain the length of the string.
The second part converting numbers to words is a bit harder. But if you google you can find some examples that have already done most of it for you.
You can use a for loop to print the number of spaces:
C++ Syntax (Toggle Plain Text)
for (i = 0; i < V; i++) { System.out.println(" "); }
Where V is a variable. You could make use of string.length() to ascertain the length of the string.
The second part converting numbers to words is a bit harder. But if you google you can find some examples that have already done most of it for you.
*Voted best profile in the world*
•
•
•
•
Originally Posted by star22
thank u friend but how can I find example from google
As opposed to learning how to Google for your exact problem?
Which do you want to do -- learn to Google or learn to program?
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
![]() |
Similar Threads
- hai friends plz suggest me (Java)
- need ur help in c++ coding plz help (C++)
- do i have a limit to my friends list (Geeks' Lounge)
- Could somebody write code for my project plz... (Visual Basic 4 / 5 / 6)
Other Threads in the C++ Forum
- Previous Thread: OOPS concepts in c++ ...
- Next Thread: Math Functions
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news node number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






