Answer to Question #19595 in C++ for nurazni

Question #19595
Write an array declaration statement that stores the following values in an array named
volts : 16.24, 18.98, 23.75, 16.29, 19.54, 14.22, 11.13, and 15.39. Include these
statements in a program that displays the values in the array.
1
Expert's answer
2012-11-27T09:53:36-0500
#include "iostream"
using namespace std;

int main()
{ int s=0;
float volts[]={16.24, 18.98, 23.75, 16.29, 19.54, 14.22, 11.13, 15.39};
& for(int i=0;i<8;i++)
&
cout<<"volts["<<i<<"]= "<<volts[i]<<endl;

system ("PAUSE");

}

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 the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS