Simple Array Program In Cpp Language



Calculating 10 integers in array function(Cpp programming Language)?


#include <iostream>
#include<conio.h>
using namespace std;
int main ( )
{
   int i , a[10]; 
   cout << "Enter 10 integers: ";
for(i = 0; i < 10; i ++)
cin >> a [ i ];
cout << endl;
   cout << "The integers are ";
for(i = 0; i < 10; i ++)
cout << a [ i ] << " ";
cout << endl;
   return 0; 
}

Comments

Popular posts from this blog

Even/Odd Number Checking Code in CPP

Calculating Name and Marks in Cpp

Triangle of Characters(CPP)