This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "resistor.h" | |
| double Resistor::defR = 1290; | |
| Resistor::Resistor() : R(defR) {} | |
| Resistor::Resistor(double r) : R(r) {} | |
| void Resistor::setDef(double r) { | |
| Resistor::defR = r; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "nem_oo.h" | |
| void strcpy(char *dest, const char *source) | |
| { | |
| while((*dest++=*source++)!='\0'); | |
| } | |
| unsigned int strlen(const char *str) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int lnko(int a, int b) | |
| { | |
| int bigger = (a>=b)?a:b, smaller = (a<=b)?a:b, ret=0, i; | |
| for(i=1; i<=smaller; i++) | |
| if(smaller%i==0 && bigger%i==0) ret = i; | |
| return ret; | |
| } |
NewerOlder