Created
May 31, 2016 19:02
-
-
Save h00s/f685bf24963d4352bc136dcee0af3a3a to your computer and use it in GitHub Desktop.
This file contains 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 <stdio.h> | |
int main(void) | |
{ | |
int a; | |
float n, N, P; | |
printf("*****MJERENJE SNAGE POMOCU ELEKTRICNOG BROJILA*****"); | |
printf("\n Ovaj program ce izracunati Mjerenje snage pomocu elektricnog brojila po formuli ; :P=(n/N)"); | |
printf("\n P-je snaga"); | |
printf("\n N-je konstanta brojila"); | |
printf("\n n-je okretaji u jednom satu"); | |
printf("\n ____________________________________________________________________"); | |
printf("\n Odaberite konstantu brojila"); | |
printf("\n 1.Ako konstanta brojila iznosi 1000"); | |
printf("\n 2.Ako konstanta brojila iznosi 450"); | |
printf("\n 3.Ako konstanta brojila iznosi 850"); | |
printf("\n Odaberite jedno od opcija:"); | |
scanf("%d", &a); | |
switch (a) | |
{ | |
case 1: | |
N=800; | |
break; | |
case 2: | |
N=1000; | |
break; | |
case 3: | |
N=450; | |
break ; | |
} | |
printf("\n Odredi okretaje u jednom satu"); | |
scanf("%f", &n); | |
P = n / N; | |
printf("\n Snaga iznosi: %f W", P); | |
getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment