Created
March 28, 2018 20:43
-
-
Save hamzamuric/7ee22fca42f4d184c06838546363411c to your computer and use it in GitHub Desktop.
Zadatak sa prvog kolokviuma iz programiranja (C).
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() { | |
int x, y, z, q, pom; | |
printf("Unesite vreme uzletanja aviona:\n"); | |
scanf("%d %d %d", &x, &y, &z); | |
printf("Koliko je sekundi avion proveo u letu?\n"); | |
scanf("%d", &q); | |
z += q; | |
pom = z / 60; | |
z %= 60; | |
y += pom; | |
pom = y / 60; | |
y %= 60; | |
x += pom; | |
printf("Avion je sleteo u %d sati, %d minuta i %d sekundi.\n", x, y, z); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
moze i bez ovog pom 👎