Areglo2examen.docx

  • Uploaded by: Jose Francisco Tejada Berno
  • 0
  • 0
  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Areglo2examen.docx as PDF for free.

More details

  • Words: 153
  • Pages: 2
#include #include #include using namespace std; int opc, fil, col, MAT[100][100], i, res, nro=2; float m[20], n[20]; void ge_mat() { for(i=1;i<=n;i++) { res=nro%4; if(i%2!=0) { for(m=1;m<=c;m++) { va[i][j]=k; k++; } } else { for(j=c;j>=1;j--) { M[i][j]=k; k++; } } } } void op_me() { while(opc!=6) { cout<<"menu\n"; cout<<"1.-ingrese dimensiones de matriz\n"; cout<<"2.-generar elementos de matriz\n"; cout<<"3.-generar vector\n"; cout<<"4.-imprimir matriz\n"; cout<<"5.-imprimir vector\n"; cout<<"6.-salir del programa\n"; cout<<"ingrese opcion: "; cin>>opc; switch(opc) { case 1: printf("ingrese numero de filas: "); scanf("%s",m); printf("ingrese numero de columnas: "); scanf("%s",n); break;

case 2: ge_mat(); printf(" se genero correctamente ");

break; case 3: break; case 4: break; case 5: break; case 6: cout<<"usted eligio salir"; break; } } }

void main() { char nombre[10], ape[10], grupo; printf("ing. nombre : "); scanf("%s",nombre); printf("ing. apellido : "); scanf("%s",ape); flushall(); printf("ing. grupo : "); scanf("%d",&grupo); printf(" \n*****************\n Programa Profesional De Ingenieria Mecanica, Mecanica Electrica Y Mecatronica\n\n Alumno: %s %s\n\n Grupo: %d\n*******************\n",nombre,ape,grupo); op_me(); }

More Documents from "Jose Francisco Tejada Berno"

Lugares Aqw.txt
October 2019 19
Areglo2examen.docx
October 2019 8
Corona.docx
October 2019 21