![]() ![]() | functions/functions-input-1.c - Funktionen f modtager værdierne af to variable som input - figur til venstre. | Lektion 6 - slide 8 : 21 Program 1 |
#include <stdio.h> /* Input: We pass the values of two variables to f */ void f(int fp1, int fp2){ printf("fp1 + fp2 = %d + %d = %d\n", fp1, fp2, fp1 + fp2); } int main(void) { int i = 3, j = 4; f(i, j); printf("i + j = %d + %d = %d\n", i, j, i + j); return 0; }