Reporte practicas proga 2do depertamental
ESCUELA SUPERIOR DE INGENERIA MECANICA Y ELECTRONICA (PLANTEL ZACATENCO)
DEPARTAMENTO DE INGENERIA EN COMUNICACIONES Y ELECTRONICA
LABORATORIO DE FUNDAMENTOS DE PROGRAMACION
NOBRES DE LOS ALUMNOS :
* De Leon Barragan Rodrigo
*PANCHO PANTERA
GRUPO: 1CV11 FECHADE ENTREGA:
INDICE:
*Practica 1.- MENU*Practica 2.- NOTAS MUSICALES
*Practica 3.- FLECHAS
P*Practica 4.- LINEA DE a
P*Practica 5.- CUADRADO HECHO POR CARÁCTER a
*Practica 6.- SERIE DE ULAM
P*Practica 7.- TEXTO CON CUADRO
*Practica 8.- VOTOS DE CANDIDATOS
P*Practica 9.- CARACTERES AL AZAR
P*Practica 10.- LLUVIA DE CARACTERES
PRACTICA 1
NTRODUCCION:
Este programa crea un menú donde podemos ver las practicaspasadas que elaboramos y desidir entre dos opciones vacicas como lo son las operaciones matematicas y las aristmeticas
CODIGO:
#include <stdio.h>
#include <conio.h>
#include <math.h>
#include <J:ecua.CPP>
#include <J:siseecu.CPP>
#include <J:PRAC12.CPP>
#include <J:PITAGORA.CPP>
#include <J:PRAC6.CPP>
#include <J:ROD.CPP>
int x, y;void main (void)
{
clrscr();
printf("\n\n este programa es un menu de apertura \npara abrir nuestras practicas \npasadas en la cual realizamos calculos matematicos\n\n ");
printf("");
printf("\n1) matematicas \n\n2)trigonometricas \n\nintroduce la opcion q desees\n\n");
scanf("%d",&x);
switch(x)
{
//caso1
case 1:
clrscr();
printf("\n\n\n * ecuacionprimergrado\n\n1)matematicas * 2)sistema de ecuaciones primer grado\n\n * 3)formula general");
scanf("%d",&y);
switch(y)
{
//segundaparte caso 1
case 1:
clrscr();
ecu();
break;
case 2:
clrscr();
ecu2();
break;
case 3:
clrscr();
chicha();
break;
}
break;
//caso 2
case 2:
clrscr();
printf("\n\n\n * distancia\n\n1)trigonometricas * 2)teorema depitagoras\n\n * 3)vectores");
scanf("%d",&y);
switch(y)
{
//segundaparte caso 2
case 1:
clrscr();
dist();
break;
case 2:
clrscr();
pit();
break;
case 3:
clrscr();
vec();
break;
}
break;
}
getch();
}
CONCLUCION:
EN ESTA PREACTICA APRENDIMOS BASICA MENTE EL COMO UTILIZAR LA FUNCION SWITCH Y EL COMO UTILIZAR LOS DISTINTOS CASOS QUE SURGEN DE ESTAPRACTICA 2
INTRODUCCION:
ESTA PRACTICA CREA UNA SERIE DE NOTAS MUSICALES UTILIZANDO LA PRACTICA PASADA DE LAS FRECUENCIA DE NOTAS
CODIGO:
#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<math.h>
#include<F:\PRAC1.CPP>
void frec (float n, float o);
void main (void)
{
j();
clrscr();
while(1)
{
clrscr();
char x;
float f;
gotoxy(1,9);printf("d.-DO r.-RE m.-MI f.-FA s.-SOL l.-LA i.-SI");
gotoxy(1,20);
printf("FAVOR DE IN TODUCIR LA LETRA DE LA NOTA DE LA NOTA:");
x=getche();
switch (x)
{
case 'd':
f=523.25;
sound(f);
delay(500);
nosound();
break;
case 'r':
f=587.33;
sound(f);
delay(500);
nosound();
break;
case 'm':
f=659.26;
sound(f);
delay(500);
nosound();
break;
case 'f':
f=698.46;
sound(f);
delay(500);nosound();
break;
case 's':
f=783.99;
sound(f);
delay(500);
nosound();
break;
case 'l':
f=880;
sound(f);
delay(500);
nosound();
break;
case 'i':
f=987.77;
sound(f);
delay(500);
nosound();
break;
case 'q':
goto fin;
}
}
fin:
}
CONCLUCION:
PRACTICA 3
INTRODUCCION:
ESTE PROGRAMA TE DISE LA DIRECCION DE LA FLECHA QUE APRIETAS EN EL TECLADO.
CODIGO:#include<stdio.h>
#include<dos.h>
#include<conio.h>
void main (void)
{
char x;
_setcursortype(_NOCURSOR);
clrscr();
while(1)
{
gotoxy(2,2);
printf("FAVOR DE PRECIONAR UNA FLECHA");
x=getche();
clrscr();
switch (x)
{
case 80:
gotoxy(10,20);
printf("ABAJO");
break;
case 72:
gotoxy(10,20);
printf("ARRIBA");
break;
case 75:
gotoxy(10,20);
printf("IZQUIERDA");...
Regístrate para leer el documento completo.