Está en la página 1de 6

// Caída Libre.cpp: archivo de proyecto principal.

#include "stdafx.h"

#include <iostream>

using namespace std;

int main()

int OP=1,OPC=1,OPC1=1; double Vo=0,Vf=0,t=0,g=9.8,h=0;

while(OP!=0)

system ("cls");

cout<<" USTED DESEA HALLAR: "<<endl;

cout<<" Lista de opciones "<<endl;

cout<<"1. MRU"<<endl;

cout<<"2. MRUV"<<endl;

cout<<"3. MCU"<<endl;

cout<<"4. MCUV"<<endl;

cout<<"5. MOVIMIENTO PARABÓLICO"<<endl;

cout<<"6. CAIDA LIBRE"<<endl;

cout<<" SELECCIONA UNA OPCIÓN ";cin>>OP;

if (OP==6)

system ("cls");

cout<<" USTED DESEA HALLAR: "<<endl;

cout<<"1.Velocidad inicial"<<endl;

cout<<"2.Velocidad final"<<endl;

cout<<"3.Tiempo"<<endl;
cout<<"4.Altura"<<endl;

cout<<" SELECCIONA UNA OPCIÓN ";cin>>OPC;

if (OPC==1)

system ("cls");

cout<<"DATOS INICIALES "<<endl;

cout<<"1.Velocidad final, gravedad, tiempo "<<endl;

cout<<"2.Velocidad final,gravedad,altura "<<endl;

cout<<"3.Gravedad, tiempo, altura "<<endl;

cout<<" SELECCIONA UNA OPCIÓN ";cin>>OPC1;

if (OPC1==1)

system ("cls");

cout<<"Ingrese velocidad final en mts/seg: ";cin>>Vf;

cout<<"Ingrese tiempo en seg : ";cin>>t;

Vo=Vf-9.8*t;

cout<<"La velocidad inicial es "<< Vo <<"mts/seg"<<endl;

system("pause");

if (OPC1==2)

system ("cls");

cout<<"Ingrese velocidad final en mts/seg : ";cin>>Vf;


cout<<"Ingrese altura en mts : ";cin>>h;

cout<<"La velocidad inicial es "<<sqrt( pow(Vf,2)-2*9.8*h)


<<"mts/seg"<<endl;

system("pause");

if (OPC1==3)

system ("cls");

cout<<"Ingrese graveda en mts/seg*seg : ";cin>>g;

cout<<"Ingrese tiempo en seg : ";cin>>t;

cout <<"Ingrese altura en mts:";cin>>h;

cout<< "La velocidad inicial es "<<( h-1/2*g*pow(t,2))/t<<


"mts/seg"<<endl;

system ("pause");

if (OPC==2)

system ("cls");

cout<<"DATOS INICIALES "<<endl;

cout<<"1.Velocidad inicial, gravedad, tiempo "<<endl;

cout<<"2.Velocidad inicial,gravedad,altura "<<endl;

cout<<" SELECCIONA UNA OPCIÓN ";cin>>OPC;


if (OPC1==1)

system ("cls");

cout<<"Ingrese velocidad inicial en mts/seg : ";cin>>Vo;

cout<<"Ingrese tiempo en seg: ";cin>>t;

Vf=Vo+9.8*t;

cout<<"La velocidad final en mts/seg "<< Vf <<endl;

system("pause");}

if (OPC1==2)

system ("cls");

cout<<"Ingrese velocidad inicial en mts/seg: ";cin>>Vo;

cout<<"Ingrese altura en mts : ";cin>>h;

cout<<"La velocidad final en mts/seg "<< sqrt(pow(Vo,2)+2*9.8*h)


<<endl;

system("pause");

if (OPC==3)

system ("cls");

cout<<"DATOS INICIALES "<<endl;

cout<<"1.Velocidad final, gravedad, Velocidad inicial "<<endl;


cout<<" SELECCIONA UNA OPCIÓN ";cin>>OPC;

if (OPC1==1)

system ("cls");

cout<<"Ingrese velocidad final en mts/seg: ";cin>>Vf;

cout<<"Ingrese gravedad en mts/seg*seg: ";cin>>g;

t=Vf+Vo/9.8;

cout<<"El tiempo es "<< t<<"seg"<<endl;

system("pause");

if (OPC==4)

system ("cls");

cout<<"DATOS INICIALES "<<endl;

cout<<"1.Tiempo, gravedad, Velocidad inicial "<<endl;

cout<<"2.Velocidad inicial,gravedad,Velocidad final "<<endl;

cout<<" SELECCIONA UNA OPCIÓN ";cin>>OPC;

if (OPC1==1)

system ("cls");

cout<<"Ingrese el tiempo en seg : ";cin>>t;

cout<<"Ingrese gravedad en mts/seg*seg : ";cin>>g;


cout<<"Ingrese velocidad inicial mts/seg : ";cin >>Vo;

h=Vo*t+1/2*9.8*pow(t,2);

cout<<"La haltura es mts "<< h <<endl;

system("pause");

if (OPC1==2)

system ("cls");

cout<<"Ingrese velocidad inicial en mts/seg : ";cin>>Vo;

cout<<"Ingrese velocidad final en mts/seg : ";cin>>Vf;

cout<<"Ingrese la gravedad en mts/seg*seg: ";cin>>g;

cout<<"La haltura es "<< Vf*Vf-Vo*Vo/2*9.8 <<"mts"<<endl;

system("pause");

También podría gustarte