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?
-
Assume the same facts as in Hurte-Paroxysm Products, Inc. (A). HP Products also believes that if it maintains the same price in Brazilian reais as a permanent policy, volume will increase at 10% per...
-
Discuss the validity of the give, get, or get off statement.
-
Next to the following list of eight characteristics of business organizations, write a brief description of how each characteristic applies to general partnerships. Characteristic 1. Life 2. Owners'...
-
Sports Drinks, Inc. began business in 2013 selling bottles of a thirst- quenching drink. Production for the first year was 104,000 bottles, and sales were 98,000 bottles. The selling price per bottle...
-
A college student borrows $1,000 for 9 months to pay for a semester of school. If the interest is $61.88, find the monthly payment.
-
What similarities exist with the job activities of the owner of an automotive repair shop that employs two people and the executive director of the Canadian Cancer Society?
-
What type of audit procedures would you adopt in The entity uses online payments for purchases. These payment are limited to OMR 100 per transaction? a) Inspection b) Observation c) External...
-
The Smelting Department of Sunland Company has the following production data for November. Beginning work in process 1,880 units that are 100% complete as to materials and 20% complete as to...
-
The following items are relevant to the preparation of a statement of cash flows for Pier Imports Inc. 1. Comparative balance sheets show a decrease of $10,800 in accrued utilities payable for the...
-
Apex Fitness Club uses straight-line depreciation for a machine costing $24,350, with an estimated four-year life and a $2,500 salvage value. At the beginning of the third year, Apex determines that...
-
How do organizations ensure that their commitment to integrity extends beyond compliance to create a deeply rooted ethical culture that drives positive behaviors ?
-
What strategies can be deployed to identify and mitigate risks of corruption or unethical behavior, ensuring a robust framework for maintaining high standards of integrity ?
-
PV ?? ( 1 + 0.08 ) 1 ?? 180 , 000 ?? + ?? t = 2 5 ?? ( 1 + 0.08 ) t ( 100 , 000 ?? 180 , 000 ) ?? + ?? t = 6 10 ?? ( 1 + 0.08 ) t ( 200 , 000 ?? 380 , 000 ) ?? + ?? t = 11 20 ?? ( 1 +...
-
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...
-
October 20X1, Little Raven plc issued 50,000 debentures, with a par value of 100 each, to investors at 80 each.The debentures are redeemable at par on 30 September 20X6 and have a coupon rate of 6%,...
-
On 1 October year 1, RPS plc issued one million 1 5% redeemable preference shares. The shares were issued at a discount of 50,000 and are due to be redeemed on 30 September Year 5. Dividends are paid...
-
(a) Who are considered to be the potential users of financial reports? (b) What do you consider to be their information needs? (c) How would you expect a consideration of user needs to influence...
Study smarter with the SolutionInn App