4 תשובות
int a,b;
;scanf("enter num to a:")
printf("a=%d",a);
אותו הדבר לb
מחשבים התנגדות שקולה במקביל ככה :
a כפול b חלקי a+b
פשוט תכתוב את זה בתרגיל אחד ארוך או בחלקים איך שאתה רוצה
#include <stdio.h>

int main() {
// declare variables to store resistor values
float resistor1, resistor2;

// prompt the user to enter resistor values
printf("enter the value of resistor 1: ");
scanf("%f", &resistor1);

printf("enter the value of resistor 2: ");
scanf("%f", &resistor2);

// calculate the weighted resistance in parallel
float weightedresistance = (resistor1 * resistor2) / (resistor1 + resistor2);

// print the result
printf("the weighted resistance in parallel is: %.2f ohms\n", weightedresistance);

return 0;
}
שואל השאלה:
תודה רבה לכם!!!!
אנונימי