Question
write a c++ program by using arrays and loops not use any function. Declare an array by the name of arr and initialize it with
write a c++ program by using arrays and loops not use any function.
Declare an array by the name of ‘arr’ and initialize it with the following values ‘={32.20,41.88,16.12, 23.88, 7.21}’. You can hard code the array just don’t specify the array size as for this problem. Understand and calculate the size of the array in a variable called ‘size’. Traverse the array using any loop and keep storing the elements at the same index after dividing it by two. Display the array being halved. Display the sum of the same array being halved.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Here is a simple C program that fulfills your requirements include int main Declare and init...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Contemporary Project Management
Authors: Timothy Kloppenborg
3rd edition
1285433351, 978-1285433356
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App