Switch to full style
For C/C++ coders discussions and solutions
Post a reply

access element in array C++

Fri Apr 08, 2011 10:25 pm

How do i write: store value of 33 in 5th element in (int done[20];)

and

How do I write C++ code to print:

1
12
123
1234
12345



Re: 2 ?'s

Fri Apr 08, 2011 10:53 pm

hi friend , this is basics of c++ ,

to put 33 in 5th ,
Code:
done[4]=33


to print this triangle
Code:
for(int i=1;i<=5;i++){
   for(
int j=1<=i;j++){
    
  
cout<<j;
}
 
cout<<endl;
}
   
 


Post a reply
  Related Posts  to : access element in array C++
 Pop the element off the end of array     -  
 Array element navigation     -  
 UnSet array element     -  
 find the largest element stored in the array     -  
 find out the number of elements in an array of 8-bit element     -  
 Array difference for associate array     -  
 Usage of big element tag.     -  
 lesson1 : <schema> Element     -  
 lesson2 : XSD simple element     -  
 print element in 2d matrix     -  

Topic Tags

C++ Arrays