Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Correcion de la preueba de pro..

184 views

Published on

  • Be the first to comment

  • Be the first to like this

Correcion de la preueba de pro..

  1. 1. CORRECCION DE LA PRUEBAEJER:1#include <iostream>#include <stdio.h>using namespace std;int main(){inti,aux,num; cout<<"ingresenum"; cin>>num; if(num>0) { for(i=0;i<num;i++) { aux=num%2*i; cout<< "el valor es:"<<aux<<endl; aux=aux+i; cout<< "el valor es:"<<aux<<endl; }//fin for } else cout<<"correcto,estas bien";}//fin del programa
  2. 2. EJER:2#include <iostream>#include <stdio.h>using namespace std;int main(){ intmatrizj,i [6][5]; { for (intj=1;j<6;j++) for (inti=5;i<0;i++) matriz=[i][j]=j*i; }}//fin del programa
  3. 3. EJER:3#include<stdio.h>#include <iostream>int main(){int mat[1][5]; for (int j=0;j<5;j++) { for (inti=0;i<=5;i++) { mat[i][j]=j*i; } } for (int j=0;j<5;j++) { for (inti=0;i<=5;i++) { printf("t%d",mat[i][j]); } printf("nn"); }}

×