SlideShare a Scribd company logo
1 of 10
EL SIGUIENTE PROGRAMA MUESTRA UN MENU PRINCIPAL DE CINCO FUNCIONES, QUE SON:
1:CALCULO DE UN CIRCUITO SERIE
2: CALCULO DE UN CIRCUITO PARALELO
3: CALCULA CODIGO DE COLORES DE LAS RESISTENCIAS
4: CALCULA CODIGO DE VALORES DE LOS CAPACITORES
5: SALIR"
DENTRO DE ESTAS MISMAS SE ENCUENTRAN OTRAS FUNCIONES QUE PERMITEN
HACER EL CALCULO DE LO QUE DESEE, ESTO FUNCIONA DE ACUERDO
AL ORDEN EN QUE ESTAN:
A CONTINUACION SE PRESENTA EL CODIGO DE PROGRAMACION QUE ESTA EN C++:
#include<stdio.h>
#include<iostream>
#include<conio.h>
#include<cmath>
#include<cstdlib>
using namespace std;
void b1()
{
cout << "n N Color Valorn";
cout << "n 0 Negro...........0";
cout << "n 1 Cafe............1";
cout << "n 2 Rojo............2";
cout << "n 3 Naranja.........3";
cout << "n 4 Amarillo........4";
cout << "n 5 Verde...........5";
cout << "n 6 Azul............6";
cout << "n 7 Violeta.........7";
cout << "n 8 Gris............8";
cout << "n 9 Blanco..........9";
}
void b3()
{
cout << "n N Color Valorn";
cout << "n 0 Negro.........................1";
cout << "n 1 cafe.........................10";
cout << "n 2 rojo........................100";
cout << "n 3 Naranja....................1000";
cout << "n 4 Amarillo..................10000";
cout << "n 5 Verde....................100000";
cout << "n 6 Azul....................1000000";
cout << "n 7 violeta................10000000";
cout << "n 8 gris..................100000000";
cout << "n 9 blanco...............1000000000";
}
void b4()
{
cout << "n N Color Porcentajen";
cout << "n 0 Dorado................10%";
cout << "n 1 Plata.................15%";
cout << "n 2 Sin color.............20%";
}
void c1()
{
cout << "n N Valorn";
cout << "n 0 1";
cout << "n 1 2";
cout << "n 2 3";
cout << "n 3 4";
cout << "n 4 5";
cout << "n 5 6";
cout << "n 6 7";
cout << "n 7 8";
cout << "n 8 9";
}
void c2()
{
cout << "n N Valorn";
cout << "n 0 0";
cout << "n 1 1";
cout << "n 2 2";
cout << "n 3 3";
cout << "n 4 4";
cout << "n 5 5";
cout << "n 6 6";
cout << "n 7 7";
cout << "n 8 8";
cout << "n 9 9";
}
void c3()
{
cout << "n N Valorn";
cout << "n 0 1";
cout << "n 1 10";
cout << "n 2 100";
cout << "n 3 1000";
cout << "n 4 10000";
cout << "n 5 100000";
cout << "n 6 0";
cout << "n 7 0";
cout << "n 8 0.01";
cout << "n 9 0.1";
}
int main ()
{
int opcion;
double resultado, result, total;
bool MULTI=false;
do
{
MENU1:
system ("cls");
cout<<"nESTE PROGRAMA CALUCULA LO SIGUIENTE:nn"<<endl;
cout<<"n MENU: MULTIFUNCIONESn";
cout<<"n 1. CALCULO DE UN CIRCUITO SERIE";
cout<<"n 2. CALCULO DE UN CIRCUITO PARALELO";
cout<<"n 3. CALCULA CODIGO DE COLORES DE LAS RESISTENCIAS";
cout<<"n 4. CALCULA CODIGO DE VALORES DE LOS CAPACITORES";
cout<<"n 5. SALIR";
cout<<"nn ELIJA UNA OPCION ";
cin>>opcion;
system("cls");
switch (opcion)
{
case 1:
{
bool SERIE=false;
do
{
int C=1, N;
float R, RT;
float VT,IT,RX,VRX;
float B=0;
system ("cls");
cout<<"nESTE PROGRAMA CALCULA LA RESISTENCIA DE UN CIRCUITO SERIE nnn";
cout<<"n MENU: CIRCUITO SERIE";
cout<<"n 1. RESISTENCIA TOTAL";
cout<<"n 2. CORRIENTE TOTAL";
cout<<"n 3. VOLTAJE EN UNA RESISTENCIA";
cout<<"n 4. REGRESAR A MENU: MULTIFUNCIONES";
cout<<"nn ESCOJA UNA OPCION ";
cin>>opcion;
system("cls");
switch (opcion)
{
case 1:
cout<<"nINTRODUZCA EL NUMERO DE RESISTENCIA A CALCULAR:"<<endl;
cin>>N;
while (C<=N)
{
cout<<"nMUESTRAME EL VALOR DE LA RESISTENCIA"<<endl;
cin>>R;
B=R+B;
C++;
}
RT=B;
cout<<"nnLA RESISTENCIA TOTAL ES "<<RT<<" OHMS"<<endl;
system ("pause");
break;
case 2:
cout<<"nINTRODUCE EL VALOR DE VOLTAJE DE ENTRADA:nn";
cin>>VT;
IT=(VT/RT);
cout<<"nnLA CORRIENTE TOTAL DEL CIRCUITO ES "<<IT<<" AMPERS"<<endl;
system ("pause");
break;
case 3:
cout<<"nLA CORRIENTE TOTAL ES "<<IT<<" AMPERS"<<endl;
cout<<"nnMUESTRAME EL VALOR DE LA RESISTENCIA GUARDADA:"<<endl;
cin>>RX;
VRX=(RX*IT);
cout<<"nnEL VOLTAJE QUE CIRCULA EN LA RESISTENCIA RX ES "<<VRX<<"
VOLTS"<<endl;
system ("pause");
break;
case 4: goto MENU1;
}
}
while(SERIE!=true);
system ("pause");
break;
}
case 2:
{
bool PARALELO=false;
do
{
int i=1, B=0;
int N;
float RT, VT1, IX1, IT1, RX1, S=0, R, Y;
system ("cls");
cout<<"nEL PROGRAMA CALUCULA LA RESISTENCIA DE UN CIRCUITO PARALELOnn"<<endl;
cout<<"n MENU: CIRCUITO PARALELOn";
cout<<"n 1. RESISTENCIA TOTAL EN EL CIRCUTO";
cout<<"n 2. CORRIENTE TOTAL DEL CIRCUITO";
cout<<"n 3. CORRIENTE EN UNA DE LAS RESISTENCIAS";
cout<<"n 4. REGRESAR A MENU: MULTIFUNCIONES";
cout<<"nn ELIJA UNA OPCION ";
cin>>opcion;
system("cls");
switch (opcion)
{
case 1:
cout<<"nINTRODUCE EL NUMERO DE RESISTENCIAS A CALCULAR "<<endl;
cin>>N;
while (i<=N)
{
cout<<"nMUESTRAME EL VALOR DE LA RESISTENCIA "<<endl;
cin>>Y;
R=1/Y;
S=S+R+B;
i++;
}
RT=1/S;
cout<<"nLA RESISTENCIA TOTAL DEL CIRCUTO ES "<<RT<<" OHMS"<<endl;
system ("pause");
break;
case 2:
cout<<"nMUESTRAME EL VALOR DEL VOLTAJE DE ENTRADA "<<endl;
cin>>VT1;
IT1=(VT1/RT);
cout<<"nLA CORRIENTE TOTAL EN EL CIRCUTO ES "<<IT1<<" AMPERS"<<endl;
system ("pause");
break;
case 3:
cout<<"nMUESTRAME EL VALOR DE LA RESISTENCIA GUARDADA "<<endl;
cin>>RX1;
IX1=(VT1/RX1);
cout<<"nLA CORRIENTE QUE CIRCULA EN LA RESISTENCIA RX ES "<<IX1<<"
AMPERS"<<endl;
system ("pause");
break;
case 4: goto MENU1;
}
}
while(PARALELO!=true);
system("pause");
break;
}
case 3:
{
bool COLOR=false;
do
{
void b1();
void b3();
void b4();
double ban1, ban2, ban3, ban4;
int banda1, banda2, banda3, banda4;
system("cls");
cout<<"nnEL PROGRAMA CALCULA EL VALOR DE LAS RESISTENCIAS RESPECTO A SUS
BANDAS DE COLORnn";
cout<<"n 1. INICIAR CON EL CALCULO DE LA RESISTENCIA";
cout<<"n 2. REGRESAR A MENU: MULTIFUNCIONES";
cout<<"nn SELECCIONE UNA OPCION ";
cin>>opcion;
system("cls");
switch (opcion)
{
case 1:
system("cls");
cout << "nDEFINE EL COLOR EN LA PRIMERA BANDA DE LA RESISTENCIAn";
b1();
cout << "nnSELECCIONE EL VALOR DE LA PRIMERA BANDA: ";
cin >> banda1;
switch(banda1)
{
case 0:
ban1=0;
break;
case 1:
ban1=1;
break;
case 2:
ban1=2;
break;
case 3:
ban1=3;
break;
case 4:
ban1=4;
break;
case 5:
ban1=5;
break;
case 6:
ban1=6;
break;
case 7:
ban1=7;
break;
case 8:
ban1=8;
break;
case 9:
ban1=9;
break;
}
system("cls");
cout << "nDEFINE EL COLOR EN LA SEGUNDA BANDA DE LA RESISTENCIAn";
b1();
cout << "nnSELECCIONE EL VALOR DE LA SEGUNDA BANDA: ";
cin >> banda2;
switch(banda2)
{
case 0:
ban2=0;
break;
case 1:
ban2=1;
break;
case 2:
ban2=2;
break;
case 3:
ban2=3;
break;
case 4:
ban2=4;
break;
case 5:
ban2=5;
break;
case 6:
ban2=6;
break;
case 7:
ban2=7;
break;
case 8:
ban2=8;
break;
case 9:
ban2=9;
break;
}
system("cls");
cout << "nDEFINE EL COLOR EN LA TERCERA BANDA DE LA RESISTENCIAn";
b3();
cout << "nnSELECCIONA EL VALOR MUTIPLICADOR EN LA TERCERA BANDA: ";
cin >> banda3;
switch(banda3)
{
case 0:
ban3=1;
break;
case 1:
ban3=10;
break;
case 2:
ban3=100;
break;
case 3:
ban3=1000;
break;
case 4:
ban3=10000;
break;
case 5:
ban3=100000;
break;
case 6:
ban3=1000000;
break;
case 7:
ban3=10000000;
break;
case 8:
ban3=100000000;
break;
case 9:
ban3=1000000000;
break;
}
system("cls");
cout << "nDEFINE EL COLOR EN LA CUARTA BANDA DE LA RESISTENCIAn";
b4();
cout << "nnSELECCIONE EL VALOR DE TOLERANCIA EN LA CUARTA BANDA: ";
cin >> banda4;
switch(banda4)
{
case 0:
ban4= 5;
break;
case 1:
ban4=10;
break;
case 2:
ban4=20;
break;
}
system("cls");
resultado=(((ban1*10)+ban2)*ban3);
if( resultado>999);
else
{
result=resultado;
cout << "nnEL VALOR DE LA RESISTENCIA ES: "<<result<<" OHMS"<<endl;
}
if( 999>= resultado || resultado > 999999);
else
{
result=resultado/1000;
cout << "nnEL VALOR DE LA RESISTENCIA ES: "<<result<<" KILO-OHMS"<<endl;
}
if(999999>= resultado || resultado > 999999999);
else
{
result=resultado/1000000;
cout << "nnEL VALOR DE LA RESISTENCIA ES: "<<result<<" MEGA-OHMS"<<endl;
}
if( resultado<=999999999);
else
{
result=resultado/1000000000;
cout << "nnEL VALOR DE LA RESISTENCIA ES: "<<result<<" GIGA-OHMS"<<endl;
}
total=ban4;
cout << "nnEL VALOR DE TOLERANCIA DE LA RESISTENCIA ES:
"<<total<<"%n"<<endl;
system("pause");
break;
case 2: goto MENU1;
}
}
while(COLOR!=true);
system ("pause");
break;
}
case 4:
{
bool CAPTOR=false;
do
{
void c1();
void c2();
void c3();
double cap1, cap2, cap3;
int capacitor1, capacitor2, capacitor3;
system("cls");
cout<<"nnEL PROGRAMA CALCULA EL VALOR DE UN CAPACITOR CERAMICOn";
cout<<"nMUESTRA LOS VALORES EN PICO, NANO Y MICRO-FARADIOSnn";
cout<<"n 1. INICIAR CON EL CALCULO DEL CAPACITOR";
cout<<"n 2. REGRESAR A MENU: MULTIFUNCIONES";
cout<<"n 3. SALIR";
cout<<"nn SELECCIONE UNA OPCION ";
cin>>opcion;
system("cls");
switch (opcion)
{
case 1:
system("cls");
cout << "nDEFINE EL PRIMER VALOR DEL CAPACITOR CERAMICOn";
c1();
cout << "nnSELECCIONE EL VALOR DEL CAPACITOR: ";
cin >> capacitor1;
switch(capacitor1)
{
case 0:
cap1=1;
break;
case 1:
cap1=2;
break;
case 2:
cap1=3;
break;
case 3:
cap1=4;
break;
case 4:
cap1=5;
break;
case 5:
cap1=6;
break;
case 6:
cap1=7;
break;
case 7:
cap1=8;
break;
case 8:
cap1=9;
break;
}
system("cls");
cout << "nDEFINE EL SEGUNDO VALOR DEL CAPACITOR CERAMICOn";
c2();
cout << "nnSELECCIONE EL VALOR DEL CAPACITOR: ";
cin >> capacitor2;
switch(capacitor2)
{
case 0:
cap2=0;
break;
case 1:
cap2=1;
break;
case 2:
cap2=2;
break;
case 3:
cap2=3;
break;
case 4:
cap2=4;
break;
case 5:
cap2=5;
break;
case 6:
cap2=6;
break;
case 7:
cap2=7;
break;
case 8:
cap2=8;
break;
case 9:
cap2=9;
break;
}
system("cls");
cout << "nDEFINE EL TERCER VALOR DEL CAPACITOR CERAMICOn";
c3();
cout << "nnSELECCIONA EL VALOR MUTIPLICADOR DEL CAPACITOR: ";
cin >> capacitor3;
switch(capacitor3)
{
case 0:
cap3=1;
break;
case 1:
cap3=10;
break;
case 2:
cap3=100;
break;
case 3:
cap3=1000;
break;
case 4:
cap3=10000;
break;
case 5:
cap3=100000;
break;
case 6:
cap3=0;
break;
case 7:
cap3=0;
break;
case 8:
cap3=0.01;
break;
case 9:
cap3=0.1;
break;
}
system("cls");
resultado=(((cap1*10)+cap2)*cap3);
cout << "nnEL VALOR DEL CAPACITOR CERAMICO ES: "<<endl;
cout << "nn "<<resultado<<" PICO-FARADIOS"<<endl;
( 999>= resultado || resultado > 999999);
result=resultado/1000;
cout << "nn "<<result<<" NANO-FARADIOS"<<endl;
(999999>= resultado || resultado > 999999999);
result=resultado/1000000;
cout << "nn "<<result<<" MICRO-FARADIOSn"<<endl;
system("pause");
break;
case 2:goto MENU1;
case 3:exit (0);
default: cout<<"OPCION NO VALIDA";
}
}
while(CAPTOR!=true);
system ("pause");
break;
}
case 5:
exit (0);
default: cout<<"OPCION NO VALIDA";
}
}
while (MULTI!=true);
system ("pause");
return 0;
}

More Related Content

What's hot

Nagios Conference 2014 - Rob Seiwert - Graphing and Trend Prediction in Nagios
Nagios Conference 2014 - Rob Seiwert - Graphing and Trend Prediction in NagiosNagios Conference 2014 - Rob Seiwert - Graphing and Trend Prediction in Nagios
Nagios Conference 2014 - Rob Seiwert - Graphing and Trend Prediction in NagiosNagios
 
RAILWAY RESERWATION PROJECT PROGRAM
RAILWAY RESERWATION PROJECT PROGRAMRAILWAY RESERWATION PROJECT PROGRAM
RAILWAY RESERWATION PROJECT PROGRAMKrishna Raj
 
Blood pressure set programming
Blood pressure set programmingBlood pressure set programming
Blood pressure set programmingNoorshahida Kassim
 
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEVISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEDarwin Durand
 
Nagios Conference 2014 - Rodrigo Faria - Developing your Plugin
Nagios Conference 2014 - Rodrigo Faria - Developing your PluginNagios Conference 2014 - Rodrigo Faria - Developing your Plugin
Nagios Conference 2014 - Rodrigo Faria - Developing your PluginNagios
 

What's hot (6)

Nagios Conference 2014 - Rob Seiwert - Graphing and Trend Prediction in Nagios
Nagios Conference 2014 - Rob Seiwert - Graphing and Trend Prediction in NagiosNagios Conference 2014 - Rob Seiwert - Graphing and Trend Prediction in Nagios
Nagios Conference 2014 - Rob Seiwert - Graphing and Trend Prediction in Nagios
 
RAILWAY RESERWATION PROJECT PROGRAM
RAILWAY RESERWATION PROJECT PROGRAMRAILWAY RESERWATION PROJECT PROGRAM
RAILWAY RESERWATION PROJECT PROGRAM
 
Blood pressure set programming
Blood pressure set programmingBlood pressure set programming
Blood pressure set programming
 
VISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLEVISUALIZAR REGISTROS EN UN JTABLE
VISUALIZAR REGISTROS EN UN JTABLE
 
Railwaynew
RailwaynewRailwaynew
Railwaynew
 
Nagios Conference 2014 - Rodrigo Faria - Developing your Plugin
Nagios Conference 2014 - Rodrigo Faria - Developing your PluginNagios Conference 2014 - Rodrigo Faria - Developing your Plugin
Nagios Conference 2014 - Rodrigo Faria - Developing your Plugin
 

Similar to Programación de C++, Función Case

Programa de Detección de Valor de una Resistencia de Carbón en C++
Programa de Detección de Valor de una Resistencia de Carbón en C++Programa de Detección de Valor de una Resistencia de Carbón en C++
Programa de Detección de Valor de una Resistencia de Carbón en C++Ramon Lop-Mi
 
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloadingkinan keshkeh
 
Program to illustrate Switch, Goto and Exit statements.
Program to illustrate Switch, Goto and  Exit statements.Program to illustrate Switch, Goto and  Exit statements.
Program to illustrate Switch, Goto and Exit statements.harman kaur
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical FileAshwin Francis
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd marchRajeev Sharan
 
Unit 1 ocs752 introduction to c programming
Unit 1 ocs752 introduction to c programmingUnit 1 ocs752 introduction to c programming
Unit 1 ocs752 introduction to c programmingvrgokila
 
Chainer-Compiler 動かしてみた
Chainer-Compiler 動かしてみたChainer-Compiler 動かしてみた
Chainer-Compiler 動かしてみたAkira Maruoka
 
Programa Sumar y Multiplicar
Programa Sumar y MultiplicarPrograma Sumar y Multiplicar
Programa Sumar y MultiplicarAnais Rodriguez
 

Similar to Programación de C++, Función Case (20)

Programa de Detección de Valor de una Resistencia de Carbón en C++
Programa de Detección de Valor de una Resistencia de Carbón en C++Programa de Detección de Valor de una Resistencia de Carbón en C++
Programa de Detección de Valor de una Resistencia de Carbón en C++
 
Project in programming
Project in programmingProject in programming
Project in programming
 
Inc decsourcefile
Inc decsourcefileInc decsourcefile
Inc decsourcefile
 
Oop1
Oop1Oop1
Oop1
 
Hospital management
Hospital managementHospital management
Hospital management
 
Hospital management
Hospital managementHospital management
Hospital management
 
C++ TUTORIAL 3
C++ TUTORIAL 3C++ TUTORIAL 3
C++ TUTORIAL 3
 
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading2 BytesC++ course_2014_c3_ function basics&parameters and overloading
2 BytesC++ course_2014_c3_ function basics&parameters and overloading
 
Program to illustrate Switch, Goto and Exit statements.
Program to illustrate Switch, Goto and  Exit statements.Program to illustrate Switch, Goto and  Exit statements.
Program to illustrate Switch, Goto and Exit statements.
 
C++ file
C++ fileC++ file
C++ file
 
C++ file
C++ fileC++ file
C++ file
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
 
Unit 1 ocs752 introduction to c programming
Unit 1 ocs752 introduction to c programmingUnit 1 ocs752 introduction to c programming
Unit 1 ocs752 introduction to c programming
 
DataTypes.ppt
DataTypes.pptDataTypes.ppt
DataTypes.ppt
 
Chainer-Compiler 動かしてみた
Chainer-Compiler 動かしてみたChainer-Compiler 動かしてみた
Chainer-Compiler 動かしてみた
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
C++ programming
C++ programmingC++ programming
C++ programming
 
Programa Sumar y Multiplicar
Programa Sumar y MultiplicarPrograma Sumar y Multiplicar
Programa Sumar y Multiplicar
 

More from Ramon Lop-Mi

Administración de Calidad Total
Administración de Calidad TotalAdministración de Calidad Total
Administración de Calidad TotalRamon Lop-Mi
 
Inteligencia Artificial
Inteligencia ArtificialInteligencia Artificial
Inteligencia ArtificialRamon Lop-Mi
 
Satisfaccion de las necesidades
Satisfaccion de las necesidadesSatisfaccion de las necesidades
Satisfaccion de las necesidadesRamon Lop-Mi
 
Instalación Eléctrica de las Lineas de Transmisión.
Instalación Eléctrica de las Lineas de Transmisión.Instalación Eléctrica de las Lineas de Transmisión.
Instalación Eléctrica de las Lineas de Transmisión.Ramon Lop-Mi
 
Plantas de tratamiento de aguas
Plantas de tratamiento de aguasPlantas de tratamiento de aguas
Plantas de tratamiento de aguasRamon Lop-Mi
 
Bombas Hidraulicas (Bombas de Paletas y Bombas de Embolo Reciprocante)
Bombas Hidraulicas (Bombas de Paletas y Bombas de Embolo Reciprocante)Bombas Hidraulicas (Bombas de Paletas y Bombas de Embolo Reciprocante)
Bombas Hidraulicas (Bombas de Paletas y Bombas de Embolo Reciprocante)Ramon Lop-Mi
 
Programa de Circuito Paralelo en C++
Programa de Circuito Paralelo en C++Programa de Circuito Paralelo en C++
Programa de Circuito Paralelo en C++Ramon Lop-Mi
 
Energia libre de gibbs
Energia libre de gibbsEnergia libre de gibbs
Energia libre de gibbsRamon Lop-Mi
 
Tercera ley de la termodinamica
Tercera   ley de la termodinamicaTercera   ley de la termodinamica
Tercera ley de la termodinamicaRamon Lop-Mi
 
Segunda ley de la termodinamica
Segunda ley de la termodinamicaSegunda ley de la termodinamica
Segunda ley de la termodinamicaRamon Lop-Mi
 

More from Ramon Lop-Mi (16)

Administración de Calidad Total
Administración de Calidad TotalAdministración de Calidad Total
Administración de Calidad Total
 
Ciclo de Otto
Ciclo de OttoCiclo de Otto
Ciclo de Otto
 
Inteligencia Artificial
Inteligencia ArtificialInteligencia Artificial
Inteligencia Artificial
 
Satisfaccion de las necesidades
Satisfaccion de las necesidadesSatisfaccion de las necesidades
Satisfaccion de las necesidades
 
Instalación Eléctrica de las Lineas de Transmisión.
Instalación Eléctrica de las Lineas de Transmisión.Instalación Eléctrica de las Lineas de Transmisión.
Instalación Eléctrica de las Lineas de Transmisión.
 
Analisis foda
Analisis  fodaAnalisis  foda
Analisis foda
 
Calidad de Vida
Calidad de VidaCalidad de Vida
Calidad de Vida
 
Plantas de tratamiento de aguas
Plantas de tratamiento de aguasPlantas de tratamiento de aguas
Plantas de tratamiento de aguas
 
Bombas Hidraulicas (Bombas de Paletas y Bombas de Embolo Reciprocante)
Bombas Hidraulicas (Bombas de Paletas y Bombas de Embolo Reciprocante)Bombas Hidraulicas (Bombas de Paletas y Bombas de Embolo Reciprocante)
Bombas Hidraulicas (Bombas de Paletas y Bombas de Embolo Reciprocante)
 
Programa de Circuito Paralelo en C++
Programa de Circuito Paralelo en C++Programa de Circuito Paralelo en C++
Programa de Circuito Paralelo en C++
 
Conicidad
ConicidadConicidad
Conicidad
 
Estructuras
EstructurasEstructuras
Estructuras
 
Flexión en Vigas
Flexión en VigasFlexión en Vigas
Flexión en Vigas
 
Energia libre de gibbs
Energia libre de gibbsEnergia libre de gibbs
Energia libre de gibbs
 
Tercera ley de la termodinamica
Tercera   ley de la termodinamicaTercera   ley de la termodinamica
Tercera ley de la termodinamica
 
Segunda ley de la termodinamica
Segunda ley de la termodinamicaSegunda ley de la termodinamica
Segunda ley de la termodinamica
 

Recently uploaded

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 

Recently uploaded (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 

Programación de C++, Función Case

  • 1. EL SIGUIENTE PROGRAMA MUESTRA UN MENU PRINCIPAL DE CINCO FUNCIONES, QUE SON: 1:CALCULO DE UN CIRCUITO SERIE 2: CALCULO DE UN CIRCUITO PARALELO 3: CALCULA CODIGO DE COLORES DE LAS RESISTENCIAS 4: CALCULA CODIGO DE VALORES DE LOS CAPACITORES 5: SALIR" DENTRO DE ESTAS MISMAS SE ENCUENTRAN OTRAS FUNCIONES QUE PERMITEN HACER EL CALCULO DE LO QUE DESEE, ESTO FUNCIONA DE ACUERDO AL ORDEN EN QUE ESTAN: A CONTINUACION SE PRESENTA EL CODIGO DE PROGRAMACION QUE ESTA EN C++: #include<stdio.h> #include<iostream> #include<conio.h> #include<cmath> #include<cstdlib> using namespace std; void b1() { cout << "n N Color Valorn"; cout << "n 0 Negro...........0"; cout << "n 1 Cafe............1"; cout << "n 2 Rojo............2"; cout << "n 3 Naranja.........3"; cout << "n 4 Amarillo........4"; cout << "n 5 Verde...........5"; cout << "n 6 Azul............6"; cout << "n 7 Violeta.........7"; cout << "n 8 Gris............8"; cout << "n 9 Blanco..........9"; } void b3() { cout << "n N Color Valorn"; cout << "n 0 Negro.........................1"; cout << "n 1 cafe.........................10"; cout << "n 2 rojo........................100"; cout << "n 3 Naranja....................1000"; cout << "n 4 Amarillo..................10000"; cout << "n 5 Verde....................100000"; cout << "n 6 Azul....................1000000"; cout << "n 7 violeta................10000000"; cout << "n 8 gris..................100000000"; cout << "n 9 blanco...............1000000000"; } void b4() { cout << "n N Color Porcentajen"; cout << "n 0 Dorado................10%"; cout << "n 1 Plata.................15%"; cout << "n 2 Sin color.............20%"; } void c1() { cout << "n N Valorn"; cout << "n 0 1"; cout << "n 1 2"; cout << "n 2 3";
  • 2. cout << "n 3 4"; cout << "n 4 5"; cout << "n 5 6"; cout << "n 6 7"; cout << "n 7 8"; cout << "n 8 9"; } void c2() { cout << "n N Valorn"; cout << "n 0 0"; cout << "n 1 1"; cout << "n 2 2"; cout << "n 3 3"; cout << "n 4 4"; cout << "n 5 5"; cout << "n 6 6"; cout << "n 7 7"; cout << "n 8 8"; cout << "n 9 9"; } void c3() { cout << "n N Valorn"; cout << "n 0 1"; cout << "n 1 10"; cout << "n 2 100"; cout << "n 3 1000"; cout << "n 4 10000"; cout << "n 5 100000"; cout << "n 6 0"; cout << "n 7 0"; cout << "n 8 0.01"; cout << "n 9 0.1"; } int main () { int opcion; double resultado, result, total; bool MULTI=false; do { MENU1: system ("cls"); cout<<"nESTE PROGRAMA CALUCULA LO SIGUIENTE:nn"<<endl; cout<<"n MENU: MULTIFUNCIONESn"; cout<<"n 1. CALCULO DE UN CIRCUITO SERIE"; cout<<"n 2. CALCULO DE UN CIRCUITO PARALELO"; cout<<"n 3. CALCULA CODIGO DE COLORES DE LAS RESISTENCIAS"; cout<<"n 4. CALCULA CODIGO DE VALORES DE LOS CAPACITORES"; cout<<"n 5. SALIR"; cout<<"nn ELIJA UNA OPCION "; cin>>opcion; system("cls"); switch (opcion) { case 1: { bool SERIE=false; do { int C=1, N; float R, RT;
  • 3. float VT,IT,RX,VRX; float B=0; system ("cls"); cout<<"nESTE PROGRAMA CALCULA LA RESISTENCIA DE UN CIRCUITO SERIE nnn"; cout<<"n MENU: CIRCUITO SERIE"; cout<<"n 1. RESISTENCIA TOTAL"; cout<<"n 2. CORRIENTE TOTAL"; cout<<"n 3. VOLTAJE EN UNA RESISTENCIA"; cout<<"n 4. REGRESAR A MENU: MULTIFUNCIONES"; cout<<"nn ESCOJA UNA OPCION "; cin>>opcion; system("cls"); switch (opcion) { case 1: cout<<"nINTRODUZCA EL NUMERO DE RESISTENCIA A CALCULAR:"<<endl; cin>>N; while (C<=N) { cout<<"nMUESTRAME EL VALOR DE LA RESISTENCIA"<<endl; cin>>R; B=R+B; C++; } RT=B; cout<<"nnLA RESISTENCIA TOTAL ES "<<RT<<" OHMS"<<endl; system ("pause"); break; case 2: cout<<"nINTRODUCE EL VALOR DE VOLTAJE DE ENTRADA:nn"; cin>>VT; IT=(VT/RT); cout<<"nnLA CORRIENTE TOTAL DEL CIRCUITO ES "<<IT<<" AMPERS"<<endl; system ("pause"); break; case 3: cout<<"nLA CORRIENTE TOTAL ES "<<IT<<" AMPERS"<<endl; cout<<"nnMUESTRAME EL VALOR DE LA RESISTENCIA GUARDADA:"<<endl; cin>>RX; VRX=(RX*IT); cout<<"nnEL VOLTAJE QUE CIRCULA EN LA RESISTENCIA RX ES "<<VRX<<" VOLTS"<<endl; system ("pause"); break; case 4: goto MENU1; } } while(SERIE!=true); system ("pause"); break; } case 2: { bool PARALELO=false; do { int i=1, B=0; int N;
  • 4. float RT, VT1, IX1, IT1, RX1, S=0, R, Y; system ("cls"); cout<<"nEL PROGRAMA CALUCULA LA RESISTENCIA DE UN CIRCUITO PARALELOnn"<<endl; cout<<"n MENU: CIRCUITO PARALELOn"; cout<<"n 1. RESISTENCIA TOTAL EN EL CIRCUTO"; cout<<"n 2. CORRIENTE TOTAL DEL CIRCUITO"; cout<<"n 3. CORRIENTE EN UNA DE LAS RESISTENCIAS"; cout<<"n 4. REGRESAR A MENU: MULTIFUNCIONES"; cout<<"nn ELIJA UNA OPCION "; cin>>opcion; system("cls"); switch (opcion) { case 1: cout<<"nINTRODUCE EL NUMERO DE RESISTENCIAS A CALCULAR "<<endl; cin>>N; while (i<=N) { cout<<"nMUESTRAME EL VALOR DE LA RESISTENCIA "<<endl; cin>>Y; R=1/Y; S=S+R+B; i++; } RT=1/S; cout<<"nLA RESISTENCIA TOTAL DEL CIRCUTO ES "<<RT<<" OHMS"<<endl; system ("pause"); break; case 2: cout<<"nMUESTRAME EL VALOR DEL VOLTAJE DE ENTRADA "<<endl; cin>>VT1; IT1=(VT1/RT); cout<<"nLA CORRIENTE TOTAL EN EL CIRCUTO ES "<<IT1<<" AMPERS"<<endl; system ("pause"); break; case 3: cout<<"nMUESTRAME EL VALOR DE LA RESISTENCIA GUARDADA "<<endl; cin>>RX1; IX1=(VT1/RX1); cout<<"nLA CORRIENTE QUE CIRCULA EN LA RESISTENCIA RX ES "<<IX1<<" AMPERS"<<endl; system ("pause"); break; case 4: goto MENU1; } } while(PARALELO!=true); system("pause"); break; } case 3: { bool COLOR=false; do { void b1(); void b3(); void b4();
  • 5. double ban1, ban2, ban3, ban4; int banda1, banda2, banda3, banda4; system("cls"); cout<<"nnEL PROGRAMA CALCULA EL VALOR DE LAS RESISTENCIAS RESPECTO A SUS BANDAS DE COLORnn"; cout<<"n 1. INICIAR CON EL CALCULO DE LA RESISTENCIA"; cout<<"n 2. REGRESAR A MENU: MULTIFUNCIONES"; cout<<"nn SELECCIONE UNA OPCION "; cin>>opcion; system("cls"); switch (opcion) { case 1: system("cls"); cout << "nDEFINE EL COLOR EN LA PRIMERA BANDA DE LA RESISTENCIAn"; b1(); cout << "nnSELECCIONE EL VALOR DE LA PRIMERA BANDA: "; cin >> banda1; switch(banda1) { case 0: ban1=0; break; case 1: ban1=1; break; case 2: ban1=2; break; case 3: ban1=3; break; case 4: ban1=4; break; case 5: ban1=5; break; case 6: ban1=6; break; case 7: ban1=7; break; case 8: ban1=8; break; case 9: ban1=9; break; } system("cls"); cout << "nDEFINE EL COLOR EN LA SEGUNDA BANDA DE LA RESISTENCIAn"; b1(); cout << "nnSELECCIONE EL VALOR DE LA SEGUNDA BANDA: "; cin >> banda2; switch(banda2) { case 0: ban2=0; break;
  • 6. case 1: ban2=1; break; case 2: ban2=2; break; case 3: ban2=3; break; case 4: ban2=4; break; case 5: ban2=5; break; case 6: ban2=6; break; case 7: ban2=7; break; case 8: ban2=8; break; case 9: ban2=9; break; } system("cls"); cout << "nDEFINE EL COLOR EN LA TERCERA BANDA DE LA RESISTENCIAn"; b3(); cout << "nnSELECCIONA EL VALOR MUTIPLICADOR EN LA TERCERA BANDA: "; cin >> banda3; switch(banda3) { case 0: ban3=1; break; case 1: ban3=10; break; case 2: ban3=100; break; case 3: ban3=1000; break; case 4: ban3=10000; break; case 5: ban3=100000; break; case 6: ban3=1000000; break; case 7: ban3=10000000; break; case 8: ban3=100000000; break; case 9:
  • 7. ban3=1000000000; break; } system("cls"); cout << "nDEFINE EL COLOR EN LA CUARTA BANDA DE LA RESISTENCIAn"; b4(); cout << "nnSELECCIONE EL VALOR DE TOLERANCIA EN LA CUARTA BANDA: "; cin >> banda4; switch(banda4) { case 0: ban4= 5; break; case 1: ban4=10; break; case 2: ban4=20; break; } system("cls"); resultado=(((ban1*10)+ban2)*ban3); if( resultado>999); else { result=resultado; cout << "nnEL VALOR DE LA RESISTENCIA ES: "<<result<<" OHMS"<<endl; } if( 999>= resultado || resultado > 999999); else { result=resultado/1000; cout << "nnEL VALOR DE LA RESISTENCIA ES: "<<result<<" KILO-OHMS"<<endl; } if(999999>= resultado || resultado > 999999999); else { result=resultado/1000000; cout << "nnEL VALOR DE LA RESISTENCIA ES: "<<result<<" MEGA-OHMS"<<endl; } if( resultado<=999999999); else { result=resultado/1000000000; cout << "nnEL VALOR DE LA RESISTENCIA ES: "<<result<<" GIGA-OHMS"<<endl; } total=ban4; cout << "nnEL VALOR DE TOLERANCIA DE LA RESISTENCIA ES: "<<total<<"%n"<<endl; system("pause"); break; case 2: goto MENU1; } } while(COLOR!=true); system ("pause"); break;
  • 8. } case 4: { bool CAPTOR=false; do { void c1(); void c2(); void c3(); double cap1, cap2, cap3; int capacitor1, capacitor2, capacitor3; system("cls"); cout<<"nnEL PROGRAMA CALCULA EL VALOR DE UN CAPACITOR CERAMICOn"; cout<<"nMUESTRA LOS VALORES EN PICO, NANO Y MICRO-FARADIOSnn"; cout<<"n 1. INICIAR CON EL CALCULO DEL CAPACITOR"; cout<<"n 2. REGRESAR A MENU: MULTIFUNCIONES"; cout<<"n 3. SALIR"; cout<<"nn SELECCIONE UNA OPCION "; cin>>opcion; system("cls"); switch (opcion) { case 1: system("cls"); cout << "nDEFINE EL PRIMER VALOR DEL CAPACITOR CERAMICOn"; c1(); cout << "nnSELECCIONE EL VALOR DEL CAPACITOR: "; cin >> capacitor1; switch(capacitor1) { case 0: cap1=1; break; case 1: cap1=2; break; case 2: cap1=3; break; case 3: cap1=4; break; case 4: cap1=5; break; case 5: cap1=6; break; case 6: cap1=7; break; case 7: cap1=8; break; case 8: cap1=9; break; } system("cls"); cout << "nDEFINE EL SEGUNDO VALOR DEL CAPACITOR CERAMICOn"; c2();
  • 9. cout << "nnSELECCIONE EL VALOR DEL CAPACITOR: "; cin >> capacitor2; switch(capacitor2) { case 0: cap2=0; break; case 1: cap2=1; break; case 2: cap2=2; break; case 3: cap2=3; break; case 4: cap2=4; break; case 5: cap2=5; break; case 6: cap2=6; break; case 7: cap2=7; break; case 8: cap2=8; break; case 9: cap2=9; break; } system("cls"); cout << "nDEFINE EL TERCER VALOR DEL CAPACITOR CERAMICOn"; c3(); cout << "nnSELECCIONA EL VALOR MUTIPLICADOR DEL CAPACITOR: "; cin >> capacitor3; switch(capacitor3) { case 0: cap3=1; break; case 1: cap3=10; break; case 2: cap3=100; break; case 3: cap3=1000; break; case 4: cap3=10000; break; case 5: cap3=100000; break; case 6: cap3=0; break;
  • 10. case 7: cap3=0; break; case 8: cap3=0.01; break; case 9: cap3=0.1; break; } system("cls"); resultado=(((cap1*10)+cap2)*cap3); cout << "nnEL VALOR DEL CAPACITOR CERAMICO ES: "<<endl; cout << "nn "<<resultado<<" PICO-FARADIOS"<<endl; ( 999>= resultado || resultado > 999999); result=resultado/1000; cout << "nn "<<result<<" NANO-FARADIOS"<<endl; (999999>= resultado || resultado > 999999999); result=resultado/1000000; cout << "nn "<<result<<" MICRO-FARADIOSn"<<endl; system("pause"); break; case 2:goto MENU1; case 3:exit (0); default: cout<<"OPCION NO VALIDA"; } } while(CAPTOR!=true); system ("pause"); break; } case 5: exit (0); default: cout<<"OPCION NO VALIDA"; } } while (MULTI!=true); system ("pause"); return 0; }