No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
3 Posted Topics
can someone help me for this cuz I dont know what to do [code=c] #include<stdio.h> #include<math.h> /**RLC Circuit**/ void main() { float v, r, l, c, f, i; long double Xc, Xl, Z, Vr, Vc, Vl; const double pi=3.1415926535; printf("Enter v="); scanf("%d",&v); printf("Enter r="); scanf("%d",&r); printf("Enter l="); scanf("%d",&l); printf("Enter c="); … | |
Write two program segments (functions) that accomplish each of the following: a) A function that Calculates the integer part of the quotient when integer a is divided by integer b. b) A function that Calculates the integer remainder when integer a is divided by integer b. Use the functions developed … | |
[code=cplusplus] #include #include int gcd (int , int ); void main () { int m, n; cout<<" Enter first integer:"; cin >>m>>endl; cout<<" Enter second integer:"; cin >>n>>endl; cout<<m<<"&"<<n<<" The GCD is:"<<gcd(m,n)<<endl; } int gcd (int x, int y) { if(y==0) return x; else return gcd(y,x%y); } [/code] |
The End.