1. Write a program that reads the size and elements of an float array from user...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write a program that reads the size and elements of an float array from user and then computes the average of the numbers in it and prints it. Then it should compute number of elements which are greater than average and prints those elements. [10| Sample input/output: Enter array size: 5 Enter elements: 12 13 16 15 14 Average = 14.000000, The elements greater than average are: 16, 15 2. Write a C program to put even and odd elements of an array in two separate arrays and show them. 101 Sample input/output: Input size of the array: 10 Input elements in array: 0123 456789 Even elements in array: 02468 Odd elements in array: 13579 3. Write C program to count the number of capital letters and the number of small letters in an input string and print those numbers. 4. Write a C program that reads a string, create a new string containing all the characters of the input string except the vowels in it, and then prints the new string. [10] Sample input/output: Enter a string: Hello how are you? Output string: HIl hw ry? 5. Write a function that returns the number of times a value appears in an array. [10] int countsearchkey (int arr(1, int size, int key) : Sample Output 1: Sample Output 2: Enter array size: 5 Array Elements: 7 3 4 81 Search Key: 4 Search Key appears 1 times Enter array size: 7 Array Elements: 23 292 10 6 Search Key: 2 Search Key appears 3 times 1. Write a program that reads the size and elements of an float array from user and then computes the average of the numbers in it and prints it. Then it should compute number of elements which are greater than average and prints those elements. [10| Sample input/output: Enter array size: 5 Enter elements: 12 13 16 15 14 Average = 14.000000, The elements greater than average are: 16, 15 2. Write a C program to put even and odd elements of an array in two separate arrays and show them. 101 Sample input/output: Input size of the array: 10 Input elements in array: 0123 456789 Even elements in array: 02468 Odd elements in array: 13579 3. Write C program to count the number of capital letters and the number of small letters in an input string and print those numbers. 4. Write a C program that reads a string, create a new string containing all the characters of the input string except the vowels in it, and then prints the new string. [10] Sample input/output: Enter a string: Hello how are you? Output string: HIl hw ry? 5. Write a function that returns the number of times a value appears in an array. [10] int countsearchkey (int arr(1, int size, int key) : Sample Output 1: Sample Output 2: Enter array size: 5 Array Elements: 7 3 4 81 Search Key: 4 Search Key appears 1 times Enter array size: 7 Array Elements: 23 292 10 6 Search Key: 2 Search Key appears 3 times
Expert Answer:
Answer rating: 100% (QA)
1 include int main int n printf Enter array size scanf dn float arr... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these computer engineering questions
-
Write a program that reads in investment amount, annual interest rate, and number of years, and displays the future investment value using the following formula: futureInvestmentValue =...
-
Write a program that reads the amount of monthly mortgage payment and the amount still owed--the outstanding balance--and then displays the amount of the payment that goes to interest and the amount...
-
Write a program that reads a number between 1,000 and 999,999 from the user, where the user enters a comma in the input. Then print the number without a comma. Here is a sample dialog; the user input...
-
1. For each of the following sequences defined as a recurrence relations, List the first five terms of the sequence. Find a formula for the general term an in terms of n. 2, an+1 = an + 2n for n 1 a....
-
Explain what will happen in the countries to which the immigrants return to potential GDP, employment, and the real wage rate. Suppose that the United States cracks down on illegal immigrants and...
-
Your insurance firm processes claims through its newer, larger high-tech facility and its older, smaller low-tech facility. Each month, the high-tech facility handles 10,000 claims, incurs $100,000...
-
How long have you been working in your current position?
-
A partial amortization schedule for a five-year note payable that Puro Co. issued on January 1, 2010, is shown here: Required a. What rate of interest is Puro Co. paying on the note? b. Using a...
-
The GRE (Graduate Record Exam) scores for both verbal and quantitative reasoning are approximately normally distributed and scaled to have mean 150 with standard deviation of 8.75. 1) Below what...
-
Two mining companies, Red and Blue, bid for the right to drill a field. The possible bids are $ 15 Million, $ 25 Million, $ 35 Million, $ 45 Million and $ 50 Million. The winner is the company with...
-
Use the statement to represent a claim. Write its complement and state which is Upper H 0 and which is Ha. Less than or equals 595
-
Jamal Company began operations on July 1, 2013. Information from job cost sheets shows the following: Job 102 was completed in July. Job 100 was completed in August, and Jobs 101 and 103 were...
-
Go to the home page of a large corporate and find its latest financial or annual reports. Look for key words in the income statement that appear in this chapter, such as sales, gross profits, and net...
-
Nagham Manufacturing is a small manufacturer that uses machine hours as its activity base for assigning overhead costs to jobs. The company estimated the following amounts for 2013 for the company...
-
The following direct labor data pertain to the operations of Hamad Manufacturing Company for the month of November: The standard cost card shows that 2.5 hours are required to complete one unit of...
-
Farid Manufacturing Company uses a job order cost accounting system and keeps perpetual inventory records. Prepare journal entries to record the following transactions during the month of June. June...
-
Hyman Minsky attributes the instability of capitalist economies and the business cycle to a. Too strict regulation of the financial sector b. Inherent to the economic reliance on the financial sector...
-
The process of collaborative goal setting by a manager and subordinate, the extent to which goals are accomplished is a major factor in evaluating and rewarding the subordinate's performance. It is...
-
Write a recursive method to print all the permutations of a string. For example, for the string abc, the permuation is abc acb bac bca cab cba public static void displayPermutation(String s) public...
-
Improve Programming Exercise 20.13 to enable the computer to display the expression if one exists, as shown in Figure 20.20. Otherwise, report that the expression does not exist. Place the label for...
-
Write a program that reads in the radius and length of a cylinder and computes the area and volume using the following formulas: area = radius * radius * volume = area * length Here is a sample run:
-
How does each of the following variables behave over the business cycle? Develop graphs to show your results and give economic explanations. a. Real imports b. Federal government receipts c. Housing...
-
In the FRED database, find a variable that is available in both a seasonally adjusted form and a not seasonally adjusted form. Plot both over time and describe how large the seasonal variation in the...
-
It has been argued that the stock market predicts recessions. Using quarterly data since 1961, plot the real value of the stock market index (the Wilshire 5000 index in the last month of the quarter...
Study smarter with the SolutionInn App