Você está na página 1de 9

EQUIPO: ARMANDO DURAN SERRANO PEREZ BUCIO JORGE

PROFESOR: CRUZ GOMEZ LUIS MANUEL

ASIGNATURA: FUNDAMENTOS DE PROGHRAMACION ESTRUCTURADA

GRUPO: 254

ALGORITMO (5 VOCALES)

INICIO

INTRODUCE UN FRASE EN MINUSCULAS CALCULAR CUANTAS VECES APARECEN LAS VOCALES IMPRIMIR CUANTAS VECES APARECIERON LAS VOCALES FIN

DF:

INICIO

INTRODUCE UN FRASE EN MINUSCULAS

CALCULAR CUANTAS VECES APARECEN LAS VOCALES

IMPRIMIR CUANTAS VECES APARECIERON LAS VOCALES

FIN

CODIGO: /* Programa que cuenta el numero de vocales expresadas en una frase */ #include<stdio.h> #include<conio.h> main()/* la funcin main inicia la ejecucin del programa */ { int CuentaCar1=0; int CuentaCar2=0; int CuentaCar3=0; int CuentaCar4=0; int CuentaCar5=0; char Cadena; printf("\t \t \t introduce una frase en minusculas\n\n"); printf("para obtener el resultado pesiona enter la tecla ctrl+Z, de nuevo enter:\n\n"); while (Cadena!=EOF) {

Cadena=getchar(); /* getchar lee los cracteres */ if (Cadena=='a') ++CuentaCar1; if (Cadena=='e') ++CuentaCar2; if (Cadena=='i') ++CuentaCar3; if (Cadena=='o') ++CuentaCar4; if (Cadena=='u') ++CuentaCar5;

} printf("\n aparecieron %d veces la letra 'a'",CuentaCar1); printf("\n aparecieron %d veces la letra 'e'",CuentaCar2); printf("\n aparecieron %d veces la letra 'i'",CuentaCar3); printf("\n aparecieron %d veces la letra 'o'",CuentaCar4); printf("\n aparecieron %d veces la letra 'u'",CuentaCar5); printf("\n\n presiona una tecla para salir"); getch(); return 0;/* indica terminacion exitosa del programa */

} /* fin de la funcin main */

CONCLUSIONES:

ARMANDO DURAN SERRANO: EN ESTOS PROGRAMAS SE UTILIZARON LOS ARREGLOS, SE IMPLEMENTO LO APRENDIDO EN CLASE, ADEMAS HACIENDO MAS PROGRAMAS SE APRENDE MAS. JORGE PEREZ BUCIO

ESTA ACTIVIDAD NOS HAYUDO ARECOPILAR INFORMACION, E IMPLEARLA BIBLIOGRAFIA:

PROGRAMACION EN LEGUAJE ESTRUCTURADO

AUTOR: M. ASUNCIN CRIADO CLAVERO. EDITORIAL: ALFAOMEGA

INTRODUCCION A LA PROGRAMACION ESTRUCTURADA EN C AUTOR: GABRIELA MARQUEZ EDITORIAL: PEARSON

Codigo
#include <iostream> #include <stdlib.h> #include <conio.h> #include <stdio.h> using namespace std; /*Este programa lee los datos de una matriz 3x4 y muestra en pantalla la suma de los datos de cada fila */ cin >> matriz[i][j]; main(){ int matriz[5][5]; } } cout << "\n"; int arreglo[5]; int i,j; //Ingreso de los datos for (i=0;i<6;i++){ for (j=0;j<6;j++){ cout << "Ingrese el numero entero correspondiente a la posicion ["<<i<<"] ["<<j<<"]: "; for (i=0;i<5;i++){ for (j=0;j<5;j++){ cout << matriz[i][j]<<" "; } } 22; //Muestra en pantalla la matriz ingresada cout << "\nLa matriz que usted ingreso es: \n\n";

printf("Matrizes acomodadas \n "); int matriz[5][5], contador=0;

int m[5][5], contadors=0; int mat[5][5]={{1},{0,1,0,0,0},{0,0,1,0,0},{0,0,0,

1 ,0},{0,0,0,0,1}}; int mon[5][5]={{0,0,1,0,0},{0,1,1,1,0},{1,1,1,1,1 },{0,1,1,1,0},{0,0,1,0,0}}; int a,b,c,d; printf("\n"); } for(int i=0;i<5;i++) { for(int j=0;j<5;j++) { for(int i=0;i<5;i++) { for(int j=0;j<5;j++) { printf(" matriz 3 \n"); matriz[i][j]=contador++; } } getch(); for( int i=0;i<5;i++) { for(int j=0;j<5;j++) { printf(" matriz 2 \n"); for( int i=0;i<5;i++) { for(int j=0;j<5;j++) { printf("%d\t",m[j][i]); } printf("\n"); } } } } } m[i][j]=contadors++; } printf("\n"); printf("%d\t",mat[a][b]); } for(a=0;a<5;a++) { for(b=0;b<5;b++) {

printf("%d\t",matriz[i][j]); } printf("Impresion de la ultima \n");

Inicio escribir(Por favor digite el nmero) leer (totalDatos) i:=0 mientras (i<totalDatos) hacer escribir(Por favor digite el dato :) escribir(i+1) leer(coleccin[i]) i:= i+1 fin-mientras Imprime Matriz Fin

Você também pode gostar