Write a C program to assign natural numbers 1 to 100 into a one-dimensional integer array....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a C program to assign natural numbers 1 to 100 into a one-dimensional integer array. Display all the values in the array on the screen. For each number in the array, determine if the number contains digit 7 or is divisible by 7. Display all those numbers on the screen. Original array: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 4 8 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 7 5 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Numbers containing digit 7 or divisible by 7: 7 14 17 21 27 28 35 37 42 47 49 56 57 63 67 70 71 72 73 74 75 76 77 78 79 84 87 91 97 98 Write a C program to assign natural numbers 1 to 100 into a one-dimensional integer array. Display all the values in the array on the screen. For each number in the array, determine if the number contains digit 7 or is divisible by 7. Display all those numbers on the screen. Original array: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 4 8 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 7 5 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Numbers containing digit 7 or divisible by 7: 7 14 17 21 27 28 35 37 42 47 49 56 57 63 67 70 71 72 73 74 75 76 77 78 79 84 87 91 97 98
Expert Answer:
Answer rating: 100% (QA)
include int main int array100 Assign natural numbers 1 to 100 into the array for int i 0 i 100 i ar... View the full answer
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Posted Date:
Students also viewed these programming questions
-
Explain how to apply the rules of Section (61)a to determine taxable items.
-
What effects do you think positive and negative thoughts, images, and self-talk have on performance? Share an example of a time when positive or negative thoughts/self-talk have affected your...
-
Dana, runs an illegal gambling joint and here are her expenses and income. Gross income $300,000 Expenses: Rent $30,000 Maintenance $6000 Bribes to police $20,000 Supplies. $4,000 Food and drink...
-
Will restricting imports affect exports and export-related jobs? How?
-
The Carrefour Group reports the following description of its financial assets available-for-sale. Assets available for sales are . . . valued at fair value. Unrealized . . . gains or losses are...
-
Consider the data set of vacuum transducer bobbin resistances given in DS 12.2.6. (a) What is the standard error of ^1? (b) Construct a two-sided 99% confidence interval for the slope parameter ^1....
-
Olympic Village Enterprises lost its entire inventory in a hurricane that occurred on July 31,2010. Over the past five years, gross profit has averaged 30% of net sales. The companys records reveal...
-
Research suggests that liberals and conservatives respond differently to gaze cuing, which is the tendency to shift attention in the direction suggested by another person's eye movements (Dodd,...
-
3. Evaluate the integral [cos' (8x)dx 4. Evaluate the integral [tan'x-sec* xdx
-
Nathan is married with two children and has AGI of $405,000. He also has the following AMT adjustments and preferences: Itemized deductions: medical after floor:$5,375 regular tax taxes: $34,354...
-
2. It is said that employee engagement is a critical factor in the long term success of an organization. In our readings we covered some important benefits of employee engagement. Answer the...
-
Case 7.3 Harvard management professor Linda Hill led a team of researchers on a decade- long study of exceptional leaders of innovation. The team studied a select group of 16 men and women from a...
-
Luzadis Company makes furniture using the latest automated technology. The company uses a job-order costing system and applies manufacturing overhead cost to products on the basis of machine-hours....
-
Show that SC (-1,0,1), that is, show that, for all z ER, if ze S (ie. z is a cluster point of (r.)), then z (-1,0,1)
-
While driving south on hwy 400, Jim gets stuck travelling at 1.81 m/s behind a slow truck. He finally gets into a passing lane, hits the gas and speeds up with a constant acceleration of 0.0535 m/s2....
-
Tech Solutions is a consulting firm that uses a job-order costing system. Its direct materials consist of hardware and software that it purchases and installs on behalf of its clients. The firm's...
-
A local manufacturing company owns and occupies several buildings and an employee parking lot on 3 acres. The insured has a CGL policy with a $1,000,000 limit. Golf carts are used occasionally by...
-
The following exercises are not grouped by type. Solve each equation. x610x -9
-
The payroll clerk at Nosaki Company wants a program that calculates and displays an employees gross pay, federal withholding tax (FWT), Social Security and Medicare (FICA) tax, state tax, and net...
-
A blueprint for creating an object in C++ is called _____________________. a. A class b. An instance c. A map d. A pattern
-
If an expression does not contain any parentheses, which of the following operators is performed first in the expression? a. Arithmetic b. Comparison c. Logical d. You cant tell without seeing the...
-
A plot that represents how much of something there is may be misleading if the baseline is not at ______________________. In Exercises 3 and 4, fill in each blank with the appropriate word or phrase.
-
The population of country A is twice as large as the population of country B. True or false: If images are used to represent the populations, both the height and width of the image for country A...
-
If the baseline of a bar graph or time-series plot is not at zero, then the differences may appear to be __________________ than they actually are.
Study smarter with the SolutionInn App