65 563
Assignments Done
99,2%
Successfully Done
In October 2018

Answer to Question #27704 in C++ for red rose

Question #27704
write a program to input 9 values in an array named volts. After the data has been entered , have your program display the values.
Expert's answer
#include<iostream>

using namespace std;

int main()
{
const int arraySize = 9;
int volts[arraySize];

for(int i=0;i<arraySize;i++)
{
cout<<"Input "<<i+1<<" value: ";
cin>>volts[i];
}

cout<<"volts array contents : ";
for(int i=0;i<arraySize;i++)
{
cout<<"["<<volts[i]<<"] ";
}

//suspend the console
cin.get();
cin.get();

return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions