Total members 11895 |It is currently Sun Dec 22, 2024 2:53 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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




Author:
Newbie
User avatar Posts: 6
Have thanks: 0 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;
}
   
 


_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time

For this message the author DrRakha has received gratitude : sakorian
Post new topic Reply to topic  [ 2 posts ] 

  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
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com