Your SlideShare is downloading. ×
Franklin
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
91
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Realize la corrida de escritorio del siguiente ejercicio de vectores en G++y llene las casillas de abajo que representen los 2 vectores con los valoresresultantesvoid main (){float num [10];float num1 [10]; ij auxint i;int j ;int aux;aux=1;0 1aux=2;1 2for (i=0;i<10;i=i+1) 23{ 3 4cout<<”salida es :”<<i<<endl; 45num[i]=i;5num1[i]=aux; 6}7aux=aux+a;8aux=aux+2;9getch();
  • 2. 10}respuesta 5 6 2 2En el siguiente ejercicio de vectores enG++ .dibuje como queda el vectorvoid main () ni j{int n [10],i,j; 00for(i=0;i<10;i++) 21{ 22if(i%2==0) 43n[i]=i; 44else 65n[i]=i+1; 6
  • 3. 6} 87for(j=0;j<10;j++) 88cout<<n[j]<<endl; 10 9getch;}respuestas0 2 2 4 4En el siguiente ejercicode matrizes en G++.llene la matriz con los vectorescoorectosvoid main(){int m [5][5];for(int j=0;j<5;j++){for(int i=0;i<5;i++){m[j][i]=j;}}
  • 4. respuestas 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4

×