Franklin
Upcoming SlideShare
Loading in...5
×
 

Franklin

on

  • 215 views

 

Statistics

Views

Total Views
215
Views on SlideShare
215
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Franklin Franklin Document Transcript

    • 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();
    • 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
    • 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;}}
    • 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