Print Out Elements in array - C++ Data Type

C++ examples for Data Type:Array

Description

Print Out Elements in array

Demo Code

#include <iostream>
using namespace std;
int main()//from w  w w.  j ava2s  . c o m
{
   double scores[5] = {0.5, 1.5, 2.5, 3.5, 4.5};
   for(int i = 0; i < 5; ++i) {
      cout << scores[i] << "  ";
   }
   return 0;
}

Result


Related Tutorials