h> void main() { int v,x,y,r ; cout <<"INGRESE LA CANTIDAD DE LAS VENTAS EN SOLES: " ; cin >> v ; x=v*0.12 ; y=v*0.15 ; if (v<80) {cout <<"NO HAY COMISION" ;} else {if (v<=600) {cout <<"LA COMISION ES 12 % DE VENTAS: " << x;} else {cout <<"LA COMISION ES 15% DE VENTAS: " << y;} _getch() ;}}
//////////// progra 7 #include "stdafx.h" #include <iostream> using namespace std ; #include<conio.h> void main() { float p,h,a,b,r,d ; char n [20] ; cout <<"INGRESE SU NOMBRE: " ;cin >> n; cout <<"INGRESE EL PAGO POR HORA: " ;cin >> p; cout <<"INGRESE LAS HORAS TRABAJADAS DURANTE LA SEMANA: ";cin >> h; d=h-40 ; a=p*h ; b=p*h+d*1.5; if (h<=40) {cout <<"Sr. " << n; cout <<" SU SUELDO SEMANAL ES: " <<a;} else { cout << "Sr. " << n ;cout <<" SU SUELDO SEMANAL ES: " <<b;} _getch() ;}
//////////////////// programa 9 #include "stdafx.h" #include <iostream> using namespace std ; #include<conio.h> void main() { float p,v,pl1a,pla2,t,a,b,r; char cv ; cout <<"INGRESE EL PRECIO DEL ARTICULO: " ;cin >> p; cout <<"ELIJA UNA OPCION: AL CONTADO (C) o A PLAZOS (P): " ; cin >> cv; v=p*0.6; a=p*1.3; b=p*1.6; if (cv=='c' || cv=='C') {cout <<"Ud. HA ELEGIDO PAGAR AL CONTADO, SOLO PAGARA: " << v;} else {{cout <<"Ud. HA ELEGIDO PAGAR A PLAZOS, INGRESE EN CUANTOS MESES DESEA PAGAR: " ; cin >> t;} if (t<12) {cout <<"Ud. PAGARA: " << a;} else {cout <<"Ud. PAGARA: " << b;}} _getch() ;}
////////programa 11 #include "stdafx.h" #include <iostream> using namespace std ; #include<conio.h> void main() { float x,y1,y2,y3,r ; cout <<"INSERTE EL VALOR DE x : " ; cin >> x ; y1=x*x+5 ; y2=(3*x)-1 ; y3=x*x-4*x+5 ; if(x<=0) {cout <<"EL VALOR DE LA FUNCION F(x) ES: " << y1 ;} else {if(x<2) {cout <<"LA SOLUCION DE LA FUNCION F(x) ES: " << y2 ;} else {cout <<"EN ESTE CASO, F(x) es: " << y3;}} _getch() ;}
Programa 12(((((((((((((((((
#include "stdafx.h" #include <iostream> using namespace std ; #include<conio.h> void main() { float h,b,c,d,e ; char t; int D;
cout <<"INGRESE SU TURNO: DIURNO(d), NOCTURNO(n): " ; cin >> t ; cout <<"INGRESE LAS HORAS TRABAJADAS: " ; cin >> h ; cout <<"ESCRIBA EL DIA DE LA SEMANA(1,2...,7): " ; cin >> D ; b=h*1.5 ; c=h*2.25 ; d=h*2.5 ; e=h*3.5 ; if(D==7) {if(t=='d') {cout <<"SU JORNADA SERA: " << d ;} else {cout <<"SU JORNADA SERA: " << e ;}} else {if(t=='d') {cout <<"SU JORNADA SERA: " << b ;} else {cout <<"SU JORNADA SERA: " << c ;}} _getch();}