I just started to learn programming 2 months ago and I am still newbie in it. I just learn how to write a code of arrays with loop. This was my code.
#include <iostream>
using namespace std;
int main()
{
int array[5];
for(int x=1; x<=5; x++)
{
fidan[x]=16;
cout<<x<< " --- " << array[x]<<endl;
}
return 0;
}
I know that array is count from 0. But I want my program to start with 1. So, at for loop instead of x=0
, I write x=1
. Then at my last x
it started to being weird.
Can someone help me with it. I would appreciate it. Thank you