write a c++ program by using arrays and loops not use any function. Declare an array by
Fantastic news! We've Found the answer you've been seeking!
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 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.
Related Book For
Posted Date: