There are at least 10 errors in the following C program. For each error you can find you should list the location of the error, describe what the error is, and state how the error can be fixed (write updated code for that line if necessary). Each error you find is worth 1.5 marks. Note that missing brackets, braces, etc count as only one error, even though the missing brackets may occur at two places.
The program is supposed to perform the following task: Read a list of names and heights from a file called âheights.txtâ. Each line of the file contains a single name (one word, 50 chars max) and an integer value representing that personâs height in cm. These names and heights should be stored in two arrays, with a maximum size of 1000. Once this is done, the user should be asked to enter a minimum and maximum height (in cm), and the program should display all people whose heights fall between those values (inclusive). If a zero is entered for either criteria, then that criteria is not checked. For example, if the user enters 0 for the maximum height, then there is no maximum value and all people above the minimum height will be listed. If both values are zero then all people will be listed. The names and heights should be displayed one per line, with the name first followed by a colon, then the height in cm. At the end of the program the total number of people matching the search criteria should be displayed as well.
1 #include <stdio.h> ;
2
3 int main ( void ){
4
5 int heights[1000], i, n, total, min, max ;
6 char names[1000] ;
7 FILE fp ;
8
9 fp = fopen ( heights.txt, "r" ) ;
10 if ( fp = NULL )
11 printf ( "Cannot open heights.txt for reading\n" )
;
12 exit ( -1 ) ;
13
14 while ( n<1000 && fscanf(fp,"%s %d", &names[n],
&heights[n]) != EOF){
15 n++ ;
16 }
17
18 printf ( "Enter minimum height to display: " ) ;
19 scanf ( "%d", &min ) ;
20 printf ( "Enter maximum height to display: " ) ;
21 scanf ( "%d", &max ) ;
22
23 total = 0 ;
24
25 for ( i = 0 ; i < n ; i++ ){
26 if ( heights[i]>=min || min==0 && heights[i]<=max
|| max==0 ){
27 // display the person and height
28 printf ( "%c: %dcm\n", names[i], heights[i] ) ;
29 total++ ;
30 }
31 i++ ;
32 }
33 printf ( "Total matches: %d\n", total ) ;
34 return (0);
35 }
In: Computer Science
ACCT â MNGT 257 Financial Management Fall 2018
Tandy Company Case Study #1 review of Financial Statements
From the information below prepare, in proper accounting form the,
Income Statement, Balance Sheet, and Statement of Changes in
Ownersâ Equity, and Statement of Cash Flows for 2016 and 2017.
In your Income Statement Calculation, include Subtotals for EBITDA, EBIT, and EBT in addition to Net Income. You must submit your answers in either a MS Word or an MS Excel file.
|
TANDY COMPANY |
Year Ending |
||||
|
6/30/2017 |
6/30/2016 |
6/30/2015 |
|||
|
Common Stock 100,000 shares outstanding |
$460,000 |
$460,000 |
$460,000 |
||
|
Net Receivables |
632,160 |
351,200 |
315,000 |
||
|
Cost of Goods Sold |
5,528,000 |
2,864,000 |
2,706,000 |
||
|
Expenses |
519,988 |
358,672 |
330,000 |
||
|
Interest Expense |
136,012 |
43,828 |
42,500 |
||
|
Property Plant and Equipment |
1,202,950 |
491,000 |
476,000 |
||
|
Less Accumulated Depreciation |
263,160 |
146,200 |
127,300 |
||
|
Income Taxes (40%) |
?? |
58,640 |
80,680 |
||
|
Cash And Cash Equivalents |
7,282 |
57,600 |
37,500 |
||
|
Sales |
6,034,000 |
3,432,000 |
3,300,000 |
||
|
Accounts Payable |
524,160 |
145,600 |
166,000 |
||
|
Notes Payable |
636,808 |
200,000 |
200,000 |
||
|
Accrued Liabilities |
489,600 |
136,000 |
122,000 |
||
|
Depreciation Expense |
116,960 |
18,900 |
19,800 |
||
|
Long Term Debt |
723,432 |
323,432 |
323,432 |
||
|
Inventory |
1,287,360 |
715,200 |
675,000 |
||
|
Dividends |
11,000 |
22,000 |
22,000 |
||
|
Retained Earnings |
32,592 |
203,768 |
104,748 |
||
|
Other Information |
|||||
|
The firm had sufficient taxable income in 2016 and 2015 to obtain a full refund in 2017 |
|||||
|
Net Income for 2016 |
$87,960 |
||||
|
TANDY COMPANY |
Year Ending |
||||
|
6/30/2017 |
6/30/2016 |
6/30/2015 |
|||
|
Common Stock 100,000 shares outstanding |
$460,000 |
$460,000 |
$460,000 |
||
|
Net Receivables |
632,160 |
351,200 |
315,000 |
||
|
Cost of Goods Sold |
5,528,000 |
2,864,000 |
2,706,000 |
||
|
Expenses |
519,988 |
358,672 |
330,000 |
||
|
Interest Expense |
136,012 |
43,828 |
42,500 |
||
|
Property Plant and Equipment |
1,202,950 |
491,000 |
476,000 |
||
|
Less Accumulated Depreciation |
263,160 |
146,200 |
127,300 |
||
|
Income Taxes (40%) |
?? |
58,640 |
80,680 |
||
|
Cash And Cash Equivalents |
7,282 |
57,600 |
37,500 |
||
|
Sales |
6,034,000 |
3,432,000 |
3,300,000 |
||
|
Accounts Payable |
524,160 |
145,600 |
166,000 |
||
|
Notes Payable |
636,808 |
200,000 |
200,000 |
||
|
Accrued Liabilities |
489,600 |
136,000 |
122,000 |
||
|
Depreciation Expense |
116,960 |
18,900 |
19,800 |
||
|
Long Term Debt |
723,432 |
323,432 |
323,432 |
||
|
Inventory |
1,287,360 |
715,200 |
675,000 |
||
|
Dividends |
11,000 |
22,000 |
22,000 |
||
|
Retained Earnings |
32,592 |
203,768 |
104,748 |
||
|
Other Information |
|||||
|
The firm had sufficient taxable income in 2016 and 2015 to obtain a full refund in 2017 |
|||||
|
Net Income for 2016 |
$87,960 |
||||
In: Accounting
Instructions
Read the case study details below then answer the questions.
Dave is a five-year-old sedentary male who was referred to a pediatric dietitian due to his pediatricianâs concerns with his weight gain over the past year. His parents recently divorced and both parents have equal custody. Prior to the divorce Dave was physically active and on a regular schedule of meals and snacks. Now Dave has unlimited access to snacks at both parentsâ homes and his favorite pastimes include watching cartoons and playing video games with his brothers. Dave often snacks while dinner is being made and frequently drinks juice and soda. He often eats meals and sacks while watching TV with or without his mom or dad. He usually refuses to sit down and eat at the dinner table.
In: Nursing
Sunset Boards is a small company that manufactures and sells surfboards in Malibu. Tad Marks, the founder of the company, is in charge of the design and sale of the surfboards, but his background is in surfing, not business. As a result, the companyâs financial records are not well maintained.
The initial investment in Sunset Boards was provided by Tad and his friends and family. Because the initial investment was relatively small, and the company has made surfboards only for its own store, the investors havenât required detailed financial statements from Tad. But thanks to word of mouth among professional surfers, sales have picked up recently, and Tad is considering a major expansion. His plans include opening another surfboard store in Hawaii, as well as supplying his âsticksâ (surfer lingo for boards) to other sellers.
Tadâs expansion plans require a significant investment, which he plans to finance with a combination of additional funds from outsiders plus some money borrowed from banks. Naturally, the new investors and creditors require more organized and detailed financial statements than Tad has previously prepared. At the urging of his investors, Tad has hired financial analyst Christina Wolfe to evaluate the performance of the company over the past year.
After rooting through old bank statements, sales receipts, tax returns, and other records, Christina has assembled the following information:
|
2017 |
2018 |
||
|
Cost of goods sold |
$ 255,605 |
$ 322,742 |
|
|
Cash |
36,884 |
55,725 |
|
|
Depreciation |
72,158 |
81,559 |
|
|
Interest expense |
15,687 |
17,980 |
|
|
Selling and administrative expenses |
50,268 |
65,610 |
|
|
Accounts payable |
26,186 |
44,318 |
|
|
Net fixed assets |
318,345 |
387,855 |
|
|
Sales (Revenue) |
501,441 |
611,224 |
|
|
Accounts receivable |
26,136 |
33,901 |
|
|
Notes payable |
29,712 |
32,441 |
|
|
Long-term debt |
160,689 |
175,340 |
|
|
Inventory |
50,318 |
67,674 |
|
|
New equity |
0 |
19,500 |
Sunset Boards currently pays out 40 percent of net income as dividends to Tad and the other original investors, and it has a 21 percent tax rate. You are Christinaâs assistant, and she has asked you to prepare the following:
An income statement for 2017 and 2018.
A balance sheet for 2017 and 2018. (HINT: remember than both sides must balance...force equity to be what it needs to be in order to make this happen...it is the "plug" variable.)
Operating cash flow for each year.
Cash flow from assets for 2018.
Cash flow to creditors for 2018.
Cash flow to stockholders for 2018.
In: Finance
I need some assistance please 400 words and more thank you
Lisa is walking down the street in January when she notices a young man named Denny. Denny looks a little worse for wear, so Lisa offers to buy him lunch. As they are talking, Denny says to Lisa: âIâm in a pretty rough spot. I donât have any money right now. But I promise to pay you $450 if you give me that coat you are carrying and some food (that sum represents the reasonable value of those items). Lisa responds: âHow old are you?â Denny states that he is 20. However, this is a lie. Denny is actually 16. Lisa looks him over one more time, and she agrees to the exchange.
Before they leave, Denny says,"Actually, I will promise to give you another $50 if you let me borrow your bike."
Lisa writes down all of these promises into a contract. Both parties sign the contract, and they go to the bank and have it notarized.
A week later Denny trashes the bike, and he tells Lisa that he is not going to pay. Lisa sues Denny in court for breach of contract, and she learns that he is only 16.
What is likely to happen in the court case?
The requirements below must be met for your paper to be accepted and graded:
Write between 500 â 750 words (approximately 2 â 3 pages) using Microsoft Word.
Attempt APA style, see example below.
Use font size 12 and 1â margins.
Include cover page and reference page.
At least 60% of your paper must be original content/writing.
No more than 40% of your content/information may come from references.
Use at least two references from outside the course material, preferably from EBSCOhost. Text book, lectures, and other materials in the course may be used, but are not counted toward the two reference requirement.
Reference material (data, dates, graphs, quotes, paraphrased
words, values, etc.) must be identified in the paper and listed on
a reference page.Reference material (data, dates, graphs, quotes,
paraphrased words, values, etc.) must come from sources such as,
scholarly journals found in EBSCOhost, online newspapers such as
The Wall Street Journal, government websites, etc. Sources such as
Wikis, Yahoo Answers, eHow, etc. are not acceptable.
A detailed explanation of how to cite a source using APA can be
found here (link).
In: Accounting
The corporation you work for has asked for a summary and report of the future projections for the next 5 years. With the help of your CFO, you have put together the following preliminary budget figures based on last year's numbers for a planned production and sales level of 4,000 units per year:
|
Building depreciation |
$200,000/yr. |
|
Machine operators |
$100,000/yr. |
|
Management staff |
$400,000/yr. |
|
Direct materials |
$4,000,000/yr. |
|
Other expenses that seem to vary based on production levels |
$3,000,000/yr. |
|
Other expenses that don't seem to vary |
$1,300,000/yr. |
|
Selling price per unit |
$5,000/unit |
|
Utilities: This category is difficult to analyze; a part of it is related to the building's heat and light, whereas a part of it is used in the manufacturing process itself. You have the following data to which you will apply the highâlow method:
|
|
You are planning for the future and working on a report based on data from last year's actual performance. You are going to calculate various figures, including the contribution margin per unit, contribution margin ratio, breakeven level in dollars, and breakeven level in units to answer some important questions regarding your data.
Using only the data from last year's actual performance, create an Excel report that answers the questions below, showing all calculations. After completing your Excel computations, in Microsoft Word, write a professional memo to the executive committee analyzing the calculations from your report. Within the memo, give your opinion based upon the numbers as to whether production seems to be budgeted properly, and whether the corporation can make an adequate profit above breakeven levels. Please explain your rationale, and include answers to the following:
Show ALL calculations.
In: Accounting
Ron Harbinger, a certified public accountant, has worked for the past eight years as a payroll clerk for Southeast Industries, a small furniture-manufacturing firm in the Northeast. Ron recently experienced unfortunate circumstances. His teenage son required major heart surgery and the medical bills not covered by Ron's insurance have financially strained his family. Ron is a hard worker and a model employee. Although he received regular performance raises during his first few years at the company, Ron's wages have not increased in the past three years. He recently asked his supervisor, Jesse Johnson, for a raise. While Jesse agreed that Ron deserved a raise, Jesse told Ron that he could not currently approve of one because of âsluggish sales.â Ron returned to his accounting duties while the financial pressures in his life continued. Two weeks later, when a salesperson, Laura Lumphouse, quit over a dispute with management, Ron came up with a plan. Since he processed employee terminations, time card approval, and paycheck distribution, Ron decided to delay Ms. Lumphouse's termination, then forge the time cards with her signature and cash her checks for himself. (Since he distributes the paychecks every two weeks no one would find out anyway.) In fact, no one ever discovered his scheme and Ron continued the practice for a full year, âearningâ Ron an extra $90,000. 1. How does Ron's scheme affect Southeast's balance sheet (specifically Cash and Retained Earnings) for the year? Ignore income taxes. 2. How does Ron's scheme to continue to pay Laura affect the income statement (specifically Revenues, Expenses and Net Income)? 3. Use the fraud triangle from Chapter 4 to first identify the three elements of the fraud triangle and to explain how Ron violated each of these elements. Write two sentences per fraud element. 4.What internal controls could have been put in place to prevent Ron's paycheck scheme in the first place? (Don't make these up: use specific internal controls outlined in Chapter 4) Required: Answer the questions 1-4 (above) by Sunday evening then reply (thoughtfully) to two other students by the time the post closes on Tuesday night. Be sure answer in complete sentences and fully cite any references used (including page numbers or url). See Rubric for grading details. All posts will be graded for content, spelling and grammar. Suggested word count: 400- 600 words.
In: Accounting
C++ program assignment asks to implement the following functions. Each function deals with null terminated C-strings. Assume that any char array passed into the functions will contain valid, null-terminated data. The functions must have the signatures listed below.
1. This function returns the last index where the target char can be found in the string. it returns -1 if the target char does not appear in the string. For example, if s is âGiantsâ and target is âaâ the function returns 2.
int lastIndexOf(char *s, char target)
2. This function alters any string that is passed in. It should reverse the string. If âflowerâ gets passed in it should be reversed in place to ârewolfâ. To be clear, just printing out the string in reverse order is insufficient to receive credit, you must change the actual string to be in reverse order.
void reverse(char *s)
3. This function finds all instances of the char âtargetâ in the string and replaces them with âreplacementCharâ. It also returns the number of replacements that it makes. If the target char does not appear in the string it returns 0 and does not change the string. For example, if s is âgo giantsâ, target is âgâ, and replacement is âGâ, the function should change s to âGo Giantsâ and return 2.
int replace(char *s, char target, char replacementChar)
4. This function returns the index in string s where the substring can first be found. For example if s is âSkyscraperâ and substring is âyscâ the function would return 2. It should return -1 if the substring does not appear in the string.
int findSubstring(char *s, char substring[])
5. This function returns true if the argument string is a palindrome. It returns false if it is not. A palindrome is a string that is spelled the same as its reverse. For example âabbaâ is a palindrome. So is âhannahâ, âabc cbaâ, and âradarâ.
bool isPalindrome(char *s)
Don't get confused by white space characters. They should not get any special treatment. âabc baâ is not a palindrome. It is not identical to its reverse.
6. This function should reverse the words in a string. A word can be considered to be any characters, including punctuation, separated by spaces (only spaces, not tabs, \n etc.). So, for example, if s is âThe Giants won the Pennant!â the function should change s to âPennant! the won Giants Theâ
void reverseWords(char *s)
Do it without using a second array.
Requirements
- You can use strlen(), strcmp(), and strncpy() if you wish, but you may not use any of the other C-string library functions such as strstr(), strncat(), etc.
- You have to use C-Strings (null-terminated arrays of chars) for this assignment.
- Need to write a simple main() function to call all of your functions and show that they work.
In: Computer Science
Case Study (Part 2) â ACCT 3000 Semester 2, 2020
You are an Audit Senior on the AUDIO Health Limited (AUDIO) audit
engagement for the financial year ending 30 June 2019. AUDIO
specialises in the design and manufacture of implantable hearing
aids and invests more than twice the industry average in research
and development. While undertaking audit planning procedures you
become aware of the following:
AUDIO has been developing its latest hearing implant, the X5, for a
number of years. AUDIO has invested heavily in research and
development of the X5 and has capitalised a significant amount in
relation to the development phase of the product. Market studies
and prototypes of the X5 have proved successful for bringing it to
the market. In July 2018, AUDIO acquired two technologically
advanced machines specifically designed for manufacturing the X5,
at a cost of $15 million each. Production and sales of the X5
hearing implant commenced in October 2018, and demand for the
product has been extremely high since its launch. AUDIO has sold
large volumes of the product and further manufactured a large
stockpile of the X5 in anticipation of on-going high demand, and a
substantial number have already been implanted in patients.
There has recently been a sharp increase in incidences of the
implant shutting down post-surgery, resulting in a number of
patients commencing legal action against AUDIO for damages and
prompting the company to initiate a recall. Initial investigations
reveal that the defect is attributable to a design flaw. It is
likely that the product in its current form cannot be sold.
Management of AUDIO is confident that it will be possible to
re-engineer the two machines acquired for the manufacturing of the
X5 to enable production of its four other product lines and
potentially for other products currently under development.
You have raised concerns with AUDIOâs audit committee on improving
the competence and objectivity of the internal audit department.
Currently, the internal audit department is made up of three recent
graduates with no prior experience who periodically report the
Audioâs Chief Executive Officer Dr. Dave Bautista.
Required:
Prepare a memorandum to the audit manager, outlining your risk
assessment relating to AUDIO Limited. When making your risk
assessment:
(a) Identify three (3) key account balances from the information
provided that are subjected to an increase in audit risk. Briefly
explain what factors increase the audit risk associated with the
three (3) accounts identified. In your explanation, please mention
the key assertion(s) at risk of material misstatement.
(b) Identify how the audit plan will be affected and recommend
specific audit procedures to address the risks associated with each
account identified.
(Please Note â Maximum Word Limit: 950 Words)
In: Accounting
1.A firm estimates sales of $250,000 in December, $275,000 in January; $225,000 in February, $300,000 in March, $350,000 in April; $280,000 in May; and $300,000 in June. November sales were $225,000. The firm typically collects 20% of its sales in cash; 50% are accounts receivable paid the month after the sale; and 30% are accounts receivable paid two months after the sale. The firmâs cost of goods sold (raw materials) amounts to 70% of its sales. The raw materials are ordered two months in advance of expected sales, but are paid for one month after they are ordered. The firm has fixed costs of $3,000 per month for rent and $12,000 per month for other fixed operating costs. The firm has $30,000 per month in salary expense. Assume a starting cash balance of $0 but a minimum cash balance of $10,000 going forward. Prepare the cash budget for January through April. What is the maximum amount of short-term loan the firm will need during the relevant time period?
You may hand-write this part of the assignment and scan it to submit, or you may put it in Excel or Word to submit.
The Dawg Shop normally writes checks in the amount of $25,000 each day. It takes six days for these checks to clear. The firm receives checks in the amount of $22,000 daily but loses five days while they are being deposited and cleared. What is the firmâs disbursement float, collections float, and net float?
With its current system, it takes seven days from the time customers mail payments until The Wood Shed deposits them. A lockbox system would reduce this collection float by three days. If the Wood Shed receives an average of $3,000 in payments per day and its opportunity cost is 12%, how much should The Wood Shed be willing to pay each month for the lockbox system?
Compute the DSO (days sales outstanding) from the following aging schedule.
Account AgeAmount OutstandingAverage Days
0-30 days$75,00024
31-60 days$30,00040
Over 60 days$10,00065
5.The firm's average accounts receivable is $1,000,000 and is financed by a 7% annual interest bank loan. The firm is considering a regional lockbox system which it believes will reduce Accounts Receivable by 20 percent. The annual cost of the system is $20,000. What is the estimated net annual savings to the firm from implementing the lockbox system and should the firm use the system?
6.A firmâs average age of accounts receivable is 40 days. If the firm has annual sales of $650,000, what is the firm's average accounts receivable balance?
In: Accounting