Total members 10249 | Gratitudes |It is currently Thu May 17, 2012 7:39 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 2 posts ] 
Author Question
 Question subject: access element in array C++
PostPosted: Fri Apr 08, 2011 10:25 pm 
Offline
Newbie
User avatar

Joined: Fri Apr 08, 2011 2:20 am
Posts: 6
Has thanked: 5 time
Have thanks: 0 time

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


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: 2 ?'s
PostPosted: Fri Apr 08, 2011 10:53 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2272
Location: Earth
Has thanked: 39 time
Have thanks: 61 time
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;
}
   
 

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )



For this message the author msi_333 has received gratitude : sakorian
TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 2 posts ] 
Quick reply


  

 Similar topics
 Connect to database Microsoft access within jsp servlet
 java code to open word doc attached in ms access.db
 search for string in a cell array
 Usage of big element tag.
 removing focus border from a HTML element
 Example of using access key with links
 inherit background color from the parent element
 Shuffle Array
 check array contains a value using javascript
 Array size to zero

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 2 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team