Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void) {
- int broj;
- int najgolem;
- int dali_sme_na_prviot_broj = 1;
- while(scanf("%d", &broj)) {
- if(dali_sme_na_prviot_broj == 1) {
- najgolem = broj;
- dali_sme_na_prviot_broj = 0;
- }
- else {
- if(broj > najgolem) {
- najgolem = broj;
- }
- }
- if(broj <= 0) {
- break;
- }
- }
- if(najgolem <= 0) {
- printf("Greska\n");
- }
- else {
- printf("%d\n", najgolem);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment