Skip to content

Instantly share code, notes, and snippets.

@hamzamuric
Created March 28, 2018 20:43
Show Gist options
  • Save hamzamuric/7ee22fca42f4d184c06838546363411c to your computer and use it in GitHub Desktop.
Save hamzamuric/7ee22fca42f4d184c06838546363411c to your computer and use it in GitHub Desktop.
Zadatak sa prvog kolokviuma iz programiranja (C).
#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;
}
@hamzamuric
Copy link
Author

moze i bez ovog pom 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment