please help i dont know was going on i want the user to enter his\her own number but it does not do so.
#include
u need to apply a loop for taking the value from user , i hope u are talking about the cell number , so the program is : int main() { int n[10]; cout<<"plz enter elements "; for(int i=0; i<10; i++) { cin>>n[i]; } //now to print the elements for(int i=0;i<10;i++) { cout<<n[i]; //add endl if you need the elements 2 be in different lines return 0; }
by the way, post the full question with ur doubt , so that any1 can help u in better way?
One other thing to watch out for in your code is that an array of 10 elements (n[10]), are actually zero indexed. You have elements n[0] thru n[9]. You don't have an element n[10], and that's not checked for, except by your code in C or C++.
my code is totally right, i have used <n[10] not = n[10]
Your's is, REMAINDER's, not so much, and we're supposed to be helping him/her.
Join our real-time social learning platform and learn together with your friends!