Color Code

Program to find out the Resistance Using color code values




#include <iostream.h>

#include <conio.h>

int main()

{

float pri, sec,multi,tolerance,a,b,c,e;

cout<<"Enter the value of Primary band ="<<endl;

cin>>pri;

 cout<<"Enter the value of Secondary band=";

cin>>sec;

 cout<<"Enter the value  multiplier band=";

cin>>multi;

 cout<<"Enter the value of  tolerance =";

cin>>tolerance;

a=((pri*10)+sec)* multi;

e=a*tolerance;

b=a-e;

c=a+e;


cout<<"Resistance= "<<b<<">="<<a<<"<="<<c;

getch();

return 0;

}

No comments :

Post a Comment