Practica2

  • November 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 Practica2 as PDF for free.

More details

  • Words: 253
  • Pages: 3
Problema 7 #include void main( ) { float costo,n,cm,cn; cout<<"ingresar costo"<<endl; cin>>costo; cout<<"ingresar numero de cuotas"<<endl; cin>>n; cn= costo * 1.19; cm= (cn/n)+ (0.05*costo); cout<<" cuota mensual:"< void main( ) { float p1,p2,p3,xp,exf,w,xf; cout<<"ingresar nota de p1"<<endl; cin>> p1; cout<<"Ingresar nota de p2"<<endl; cin>>p2; cout<<"ingresar nota de p3"<<endl; cin>>p3; cout<<"ingresar examen final"<<endl; cin>>exf; cout<<"ingresar nota de trabajo"<<endl; cin>>w; xp = (p1+p2+p3)/3; xf=(xp*0.55)+(exf*0.30)+ (w*0.15); cout<<" El promedio final es:"<<xf<<endl; } Problema 9 #include void main( ) { float m,e1,e2,e3,mr; cout<<"ingresar edad"<<endl; cin>>e1; cout<<"Ingresar edad 2"<<endl; cin>>e2; cout<<"ingresar edad 3"<<endl; cin>>e3; cout<<"ingresar monto total"<<endl; cin>>m; mr = e1*m/(e1+e2+e3); cout<<" El monto a recibir es:"<<mr<<endl; }

Problema 10 #include void main( ) { float cant,p,y,m; cout<<"ingresar cantidad(en pulgadas)"<<endl; cin>>cant; p= cant/12; y= cant/36; m= cant*(0.0254); cout<<" yardas:"< void main( ) { float cant,l,m,p; cout<<"ingresar cantidad(en galones)"<<endl; cin>>cant; l= cant*3.79; m= l/1000; p= m/0.0283; cout<<" litros:"< void main( ) { float pulg,pies,t; cout<<"ingresar pies"<<endl; cin>>pies; cout<<"ingresar pulgadas"<<endl; cin>>pulg; t= (pies*12*0.0254)+ (pulg*0.0254); cout<<" talla ( en metros):"<
Problema 17 #include void main( ) { float ni,a,b,c,d; cout<<"ingresar numero"<<endl; cin>>ni; a= int(ni/1000); b= int((ni-a*1000)/100); c= int((ni-a*1000-b*100)/10); d= ni-a*1000-b*100-c*10; cout<<" en nuevo numero es:"< void main( ) { float ni,a,b,c,d,e,s,pr; cout<<"ingresar numero"<<endl; cin>>ni; a= int(ni/10000); b= int((ni-a*10000)/1000); c= int((ni-a*10000-b*1000)/100); d= int((ni-a*10000-b*1000-c*100)/10); e= ni-a*10000-b*1000-c*100-d*10; s=a+b+c+d+e; pr= a*b*c*d*e; cout<<" la suma es:"<<s<<endl; cout<<" el producto es:"<<pr<<endl; }

Related Documents

Practica2
April 2020 7
Practica2
November 2019 9
Practica2
October 2019 15
Practica2
December 2019 13
Practica2
November 2019 15
Practica2
October 2019 8