Check work. <code> write the statement to declare and intialize a one demensiona
ID: 3635443 • Letter: C
Question
Check work.<code>
write the statement to declare and intialize a one demensional double array named rates that has five elements. Use the following numbers to intialize the array: 6.5, 8.3, 4.0, 2.0, and 10.5 Use the FOR statement.
//display the contents of the array and use the for statement
#include <iostream>
using namespace std;
int main()
{
double rates[5] = {6.5, 8.3, 4.0, 2.0,10.5};
//fill array
for (int rates = 0; rates < 5; rates += 1)
{
cout << "Display Rates: ";
cout << "Rates: ";
} //end for
system("pause");
return 0;
} //end of main function
//end
<code>
Thanks
Explanation / Answer
Please rate:Thanks.. #include using namespace std; int main() { double rates[5] = {6.5, 8.3, 4.0, 2.0,10.5}; //fill array coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.