Funkcije\Metode

-Uvod u C++-


Website maintained by ntrifunovic Theme by mattgraham modified by ntrifunovic

<tip> <ime>(<lista_argumenata>) <telo>

Argumenti

Primer:

#include<stdio.h>

int zbir(int a, int b) {
    return a + b;
}

int main() {
    int x = 1, y = 3;

    printf("%d %d %d", zbir(x, y), zbir(x, 5), zbir(3, 5));
}

Sta ispisuje program?

Resenje: 4 6 8


comments powered by Disqus