Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * rezistente.c
- *
- * Created on: Dec 16, 2019
- * Author: cdamian
- */
- #include<stdio.h>
- int main(){
- // declara variabilele
- int R1, R2, R3, U;
- float I, Re;
- // citesc datele de intrare
- printf("Introduceti valorile celor 3 rez si a tensiunii:");
- scanf("%d%d%d%d", &R1, &R2, &R3, &U);
- // calcule
- Re = 1 / ( 1.0 / (R1 + R2) + 1 / (float)R3);
- I = U / Re;
- // afisare rezultate
- printf("Rez echiv este: %f\n", Re);
- printf("\nCurenutl prin circuit este: %f", I);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement