Answers for "for arrray c++ example"

C++
0

array and for loop in c++

//inserting array elements in cpp
#include<iostream>
using namespace std;
int main()
{
  int arr[100];//you can give any data type and any array size you want
  for(int i=0;i<100;i++)
  {
    cin>>arr[i];
  }
  return 0;
}
Posted by: Guest on May-30-2021

Browse Popular Code Answers by Language