Essays.club - Ensayos gratis, notas de cursos, notas de libros, tareas, monografías y trabajos de investigación
Buscar

Programacion práctica

Enviado por   •  12 de Abril de 2018  •  564 Palabras (3 Páginas)  •  291 Visitas

Página 1 de 3

...

{ float ve,vs;

float r2;

gotoxy(25,2);

printf("ENCUENTRA EL VALOR DE LA RESISTENCIA 1");

gotoxy(25,5);

printf ("ingrese el valor de la resistencia 2 [ohms] : "); scanf("%f",&r2);

gotoxy(25,7);

printf("ingrese el valor de el voltaje de entrada :");scanf("%f",&ve);

gotoxy(25,9);

printf("ingrese el valor de el voltaje de salida :");

scanf("%f",&vs);

gotoxy(25,11);

printf("EL VALOR DE LA RESISTENCIA 1 : %f",r2/((vs/ve)-1));

gotoxy(25,13);

printf("EL vALOR DE LA GANANCIA : %f",(vs/ve));

getch();

}

Practica 6

*fuerza resultante

#include

#include

#include

double fuerza(double fx , double fy)

{

return sqrt(pow(fx,2)+pow(fy,2)); }

int main ()

{ //portada(); clrscr();

float f1,a1,f2,a2,fx,fy,ft;

//textbackground(23); textcolor(16); clrscr();

//gotoxy(19,2);

printf("calcula la fuerza resultante con su angulo resultante");

//gotoxy(30,5);

printf("ingrese f1 :"); scanf("%f",&f1);

//gotoxy(30,7);

printf("ingrese a1:"); scanf("%f",&a1);

printf("ingrese f2 :"); scanf("%f",&f2);

printf("ingrese angulo 2 :"); scanf("%f",&a2);

fx=((f1*cos(a1/57.29))+(f2*cos(a2/57.29)));

fy=((f1*sin(a1/57.29))+(f2*sin(a2/57.29)));

ft=fuerza(fx,fy); //gotoxy(30,9);

printf("la fuerza resultante : %f",ft);

//gotoxy(30,13);

printf("su angulo resultante es de : %f",(atan(fy/fx)*57.299));

getch();

}

Practica 7

*frecuencia nota usical

#include

#include

#include

float frec(int n , int o)

{

return (440*exp(((o-4)+(n-10)/12.0)*log(2)));

}

int main ()

{ //portada(); clrscr();

float x; int n,o; //textbackground(23); textcolor(16); clrscr();

//gotoxy(19,2);

printf("calcula la frecuencia de una nota musical"); //

gotoxy(30,5);

printf("ingrese la nota :"); scanf("%d",&n);

//gotoxy(30,7);

printf("ingrese la octava :"); scanf("%d",&o); x=frec(n,o);

//gotoxy(30,9);

printf("la frecuencia de la nota musical es de : %f",x);

getch();

}

Practica 8

*porcentaje con fucnion

#include

#include

#include"portada.c"

float porce(int h, int m)

{

return(h*100.0/(h+m));

}

int main ()

{

portada(); clrscr();

float ph,pm;

int h,m;

textbackground(23); textcolor(16); clrscr();

gotoxy(19,2);

printf("PORCENTAJE DE HOMBRES Y MUJERES EN UN SALON");

gotoxy(30,5);

printf("HOMBRES:"); scanf("%d",& h);

gotoxy(30,7);

printf("MUJERES:"); scanf("%d",& m);

ph=porce(h,m);

pm=porce(m,h);

gotoxy(30,9);

printf("HOMBRES: %f",ph);

gotoxy(30,13);

printf("MUJERES: %f",pm);

getch();

}

Practica

...

Descargar como  txt (7.7 Kb)   pdf (62.6 Kb)   docx (21.4 Kb)  
Leer 2 páginas más »
Disponible sólo en Essays.club