Skip to content

Instantly share code, notes, and snippets.

@h00s
Created May 30, 2016 20:36
Show Gist options
  • Save h00s/6329f4a9e4fd3c3768d8cabed112022c to your computer and use it in GitHub Desktop.
Save h00s/6329f4a9e4fd3c3768d8cabed112022c to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(void)
{
int opcija, Ruk, R1, R2, R3;
printf ("\n\n\n\n * SERIJSKI SPOJ OTPORA *");
printf ("\n\n\n\n ----[ R1 ]----[ R2 ]----[ R3 ]---- \n\n");
printf("\n Jednazba za racunanje ukupupnog otpora: Ruk=R1+R2+ ....Rn \n ");
printf("\n\n ako trazite ukupni otpor pritisnite 1");
scanf("%d", &opcija);
switch (opcija)
{
case 1 :
printf("unesite iznos prvog otpornika");
scanf("%d", &R1);
printf("unesite iznos drugog otpornika");
scanf("%d", &R2);
printf("unesite iznos treceg otpornika");
scanf("%d", &R3);
Ruk = R1 + R2 + R3;
printf("ukupni otpor iznosi %d :", Ruk);
break;
}
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment