SlideShare a Scribd company logo
1 of 9
LA ESTRUCTURA DE ESTE PROGRAMA TIENE COMO FINALIDADOTORGAREL VALORDE LA
RESISTENCIA DE CARBON,PARA ESTONECESITAMOS LASBANDASDE COLORES QUE SE PRESENTA
EN LA RESISTENCIA A CALCULAR. LA REALIZACION DEESTA ESTRUCTURA ES A TRAVES DE
PROGRAMACION DE C++
#include<iostream>
usingnamespace std;
voidb1();
voidb3();
voidb4();
double ban1,ban2, ban3,ban4;
intbanda1, banda2, banda3,banda4, opcion;
double resultado,result,total;
voidb1()
{
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";
}
voidb3()
{
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";
}
voidb4()
{
cout << "n N Color Porcentajen";
cout << "n 0 Dorado.................5%";
cout << "n 1 Plata.................10%";
cout << "n 2 Sin color.............20%";
}
intmain()
{
bool COLOR=true;
do
{
system("cls");
cout<<"nnELPROGRAMA CALCULA EL VALORDE LASRESISTENCIASRESPECTOA SUS BANDASDE
COLORnn";
cout<<"n 1. INICIARCON EL CALCULO DE LA RESISTENCIA";
cout<<"n 2. SALIR";
cout<<"nnSELECCIONEUNA OPCION ";
cin>>opcion;
system("cls");
switch(opcion)
{
case 1:
system("cls");
cout << "nDEFINEEL COLOR EN LA PRIMERA BANDA DE LA RESISTENCIAn";
b1();
cout << "nnSELECCIONEELVALOR 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 << "nDEFINEEL COLOR EN LA SEGUNDA BANDA DE LA RESISTENCIAn";
b1();
cout << "nnSELECCIONEELVALOR 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 << "nDEFINEEL COLOR EN LA TERCERA BANDA DE LA RESISTENCIAn";
b3();
cout << "nnSELECCIONA ELVALORMUTIPLICADOREN 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 << "nDEFINEEL COLOR EN LA CUARTA BANDA DE LA RESISTENCIAn";
b4();
cout << "nnSELECCIONEELVALORDE 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 << "nnELVALORDE LA RESISTENCIA ES: "<<result<<" OHMS"<<endl;
}
if( 999>= resultado||resultado>999999);
else
{
result=resultado/1000;
cout << "nnELVALORDE LA RESISTENCIA ES: "<<result<<" KILO-OHMS"<<endl;
}
if(999999>= resultado||resultado>999999999);
else
{
result=resultado/1000000;
cout << "nnELVALORDE LA RESISTENCIA ES: "<<result<<" MEGA-OHMS"<<endl;
}
if( resultado<=999999999);
else
{
result=resultado/1000000000;
cout << "nnELVALORDE LA RESISTENCIA ES: "<<result<<" GIGA-OHMS"<<endl;
}
total=ban4;
cout << "nnELVALORDE TOLERANCIA DE LA RESISTENCIA ES: "<<total<<"%n"<<endl;
system("pause");
break;
case 2: exit(0);
default:cout<<"OPCION NOVALIDA";
}
}
while (COLOR!=0);
system("pause");
return0;
}

More Related Content

Similar to Programa de Detección de Valor de una Resistencia de Carbón en C++

Similar to Programa de Detección de Valor de una Resistencia de Carbón en C++ (7)

Programación de C++, Función Case
Programación de C++, Función CaseProgramación de C++, Función Case
Programación de C++, Función Case
 
Lab # 3
Lab # 3Lab # 3
Lab # 3
 
BESTest
BESTestBESTest
BESTest
 
Ramirez slideshow
Ramirez slideshowRamirez slideshow
Ramirez slideshow
 
Oop1
Oop1Oop1
Oop1
 
Dsp manual
Dsp manualDsp manual
Dsp manual
 
Powerpoint switch1
Powerpoint switch1Powerpoint switch1
Powerpoint switch1
 

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
 
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 (15)

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
 
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

ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 

Recently uploaded (20)

ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 

Programa de Detección de Valor de una Resistencia de Carbón en C++

  • 1. LA ESTRUCTURA DE ESTE PROGRAMA TIENE COMO FINALIDADOTORGAREL VALORDE LA RESISTENCIA DE CARBON,PARA ESTONECESITAMOS LASBANDASDE COLORES QUE SE PRESENTA EN LA RESISTENCIA A CALCULAR. LA REALIZACION DEESTA ESTRUCTURA ES A TRAVES DE PROGRAMACION DE C++ #include<iostream> usingnamespace std; voidb1(); voidb3(); voidb4(); double ban1,ban2, ban3,ban4; intbanda1, banda2, banda3,banda4, opcion; double resultado,result,total; voidb1() { 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"; } voidb3()
  • 2. { 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"; } voidb4() { cout << "n N Color Porcentajen"; cout << "n 0 Dorado.................5%"; cout << "n 1 Plata.................10%"; cout << "n 2 Sin color.............20%"; } intmain() { bool COLOR=true; do { system("cls");
  • 3. cout<<"nnELPROGRAMA CALCULA EL VALORDE LASRESISTENCIASRESPECTOA SUS BANDASDE COLORnn"; cout<<"n 1. INICIARCON EL CALCULO DE LA RESISTENCIA"; cout<<"n 2. SALIR"; cout<<"nnSELECCIONEUNA OPCION "; cin>>opcion; system("cls"); switch(opcion) { case 1: system("cls"); cout << "nDEFINEEL COLOR EN LA PRIMERA BANDA DE LA RESISTENCIAn"; b1(); cout << "nnSELECCIONEELVALOR DE LA PRIMERA BANDA: "; cin >> banda1; switch(banda1) { case 0: ban1=0; break; case 1: ban1=1; break; case 2: ban1=2; break;
  • 4. 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 << "nDEFINEEL COLOR EN LA SEGUNDA BANDA DE LA RESISTENCIAn"; b1(); cout << "nnSELECCIONEELVALOR DE LA SEGUNDA BANDA: ";
  • 5. 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;
  • 6. break; case 8: ban2=8; break; case 9: ban2=9; break; } system("cls"); cout << "nDEFINEEL COLOR EN LA TERCERA BANDA DE LA RESISTENCIAn"; b3(); cout << "nnSELECCIONA ELVALORMUTIPLICADOREN 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;
  • 7. 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 << "nDEFINEEL COLOR EN LA CUARTA BANDA DE LA RESISTENCIAn"; b4(); cout << "nnSELECCIONEELVALORDE TOLERANCIA EN LA CUARTA BANDA: "; cin >> banda4; switch(banda4)
  • 8. { 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 << "nnELVALORDE LA RESISTENCIA ES: "<<result<<" OHMS"<<endl; } if( 999>= resultado||resultado>999999); else { result=resultado/1000; cout << "nnELVALORDE LA RESISTENCIA ES: "<<result<<" KILO-OHMS"<<endl; }
  • 9. if(999999>= resultado||resultado>999999999); else { result=resultado/1000000; cout << "nnELVALORDE LA RESISTENCIA ES: "<<result<<" MEGA-OHMS"<<endl; } if( resultado<=999999999); else { result=resultado/1000000000; cout << "nnELVALORDE LA RESISTENCIA ES: "<<result<<" GIGA-OHMS"<<endl; } total=ban4; cout << "nnELVALORDE TOLERANCIA DE LA RESISTENCIA ES: "<<total<<"%n"<<endl; system("pause"); break; case 2: exit(0); default:cout<<"OPCION NOVALIDA"; } } while (COLOR!=0); system("pause"); return0; }